Skip to content

dx charts flickering on every update within a panel #1063

@jnumainville

Description

@jnumainville

Description

dx charts are flickering on every update within a panel, even with memoization

Steps to reproduce

Run the following code

from deephaven import ui
import deephaven.plot.express as dx
from deephaven import agg

iris = dx.data.iris()

@ui.component
def create_chart():
    return dx.histogram(iris, x="SepalLength")

@ui.component
def flickering_memo():
  chart = ui.use_memo(lambda: create_chart(), [])
  text, set_text = ui.use_state(False)

  return [
    ui.button(text, on_press=lambda: set_text(not text)),
    chart
  ]

output = flickering_memo()

Then click the button

Expected results

Button changes value but chart does not change at all

Actual results

Chart quickly flickers

Versions

Engine Version: 0.37.1
Web UI Version: 0.99.2
Python Version: 3.8.19
Java Version: 19.0.1
Groovy Version: 3.0.22
Barrage Version: 0.7.2
Browser Name: Chrome 131
User Agent OS: macOS 10.15.7
@deephaven/js-plugin-plotly-express: 0.12.0
@deephaven/js-plugin-ui: 0.23.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions