Skip to content

Legacy plot titles don't change when they should on rerender #1042

@jnumainville

Description

@jnumainville

Legacy plot titles don't change when they should.
In the below example, the title never changes from the initial sym

import deephaven.plot.express as dx
from deephaven.plot.figure import Figure

stocks = dx.data.stocks()
syms = stocks.view("Sym").select_distinct("Sym")

@ui.component
def plot_with_title():
    sym, set_sym = ui.use_state("LIZARD")
    picker = ui.picker(syms, selected_key=sym, on_change=set_sym)

    plot_line = (
        Figure()
        .plot_xy(series_name="Price", t=stocks, x="Timestamp", y="Price")
        .figure_title(f"Price of {sym}")
        .show()
    )
    return [picker, plot_line]

test = plot_with_title()
Screenshot 2024-11-25 at 3 02 39 PM Screenshot 2024-11-25 at 3 02 53 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions