Skip to content

debug JSON not updating in PerspectiveWidget (and other discrepencies in perspective widget) #2766

Description

@jgunstone

Bug Report

Steps to Reproduce:

from datetime import date, datetime
import numpy as np
import pandas as pd
import perspective
from perspective import PerspectiveWidget, Aggregate, Sort, Plugin
import ipywidgets as w

data = pd.DataFrame({
    "int": np.arange(100),
    "float": [i * 1.5 for i in range(100)],
    "bool": [True for i in range(100)],
    "date": [date.today() for i in range(100)],
    "datetime": [datetime.now() for i in range(100)],
    "string": [str(i) for i in range(100)]
})

dg = perspective.PerspectiveWidget(
    data,
    plugin=Plugin.XBAR,
    aggregates={"datetime": Aggregate.ANY},
    sort=[["date", Sort.DESC]]
)
dg
  1. drag bool into "Group By" field
  2. no change in the debug JSON

Expected Result:

when you make changes to the UI config settings they are updated in the debug JSON

Actual Result:

image

Environment:

fresh install -

environment.yml

name: perspective-test
channels:
  - defaults
  - conda-forge
dependencies:
  - python
  - jupyterlab
  - perspective
(base) jovyan@PORT4028:~/meetings-and-notes/20240925-PerspectiveGridTests$ mamba env create -f environment.yml
(base) jovyan@PORT4028:~/meetings-and-notes/20240925-PerspectiveGridTests$ mamba activate perspective-test
(perspective-test) jovyan@PORT4028:~/meetings-and-notes/20240925-PerspectiveGridTests$ mamba list perspective
# packages in environment at /home/jovyan/miniforge3/envs/perspective-test:
#
# Name                    Version                   Build  Channel
perspective               2.10.1          py311hcf300bf_2    conda-forge

Additional Context:

some other issues I've encountered with the jupyter perspective widget vs the online examples (e.g. https://perspective.finos.org/block/?example=editable). True in both jupyter notebooks and the PerspectiveCSV viewer.

  • datagrid operation descriptions not shown

image
image

  • reset button doing not doing anything

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions