Skip to content

Deephaven express chart title does not update dynamically #377

@mofojed

Description

@mofojed

Description

When creating a Deephaven express chart using deephaven.ui, the title is not updating dynamically.

Steps to reproduce

  1. Create the following component:
from deephaven import ui
from deephaven.plot import express as dx


@ui.component
def ui_stock_widget_plot(source, default_sym="", default_exchange=""):
    sym, set_sym = ui.use_state(default_sym)
    exchange, set_exchange = ui.use_state(default_exchange)

    ti1 = ui.text_field(
        label="Sym", label_position="side", value=sym, on_change=set_sym
    )
    ti2 = ui.text_field(
        label="Exchange", label_position="side", value=exchange, on_change=set_exchange
    )
    t1 = source.where([f"sym=`{sym.upper()}`", f"exchange=`{exchange}`"])
    p = dx.line(table=t1, x="timestamp", y="price", title=f"{sym}-{exchange}")

    return ui.flex(ui.flex(ti1, ti2), t1, p, direction="column", flex_grow=1)


my_stock_widget_plot = ui_stock_widget_plot(stocks, "CAT", "TPET")
  1. Change the Sym or Exchange

Expected results
2. The contents and title of the chart should update

Actual results
2. The contents update, but the title does not

Additional details and attachments

image

Versions

Engine Version: 0.34.0-SNAPSHOT
Web UI Version: 0.69.1
Java Version: 21.0.2
Barrage Version: 0.6.0
Browser Name: Chrome 123
OS Name: macOS 10.15.7

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions