plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
21.53k stars 2.07k forks source link

subtitle edit config does not always work #2954

Open marcstern14 opened 3 months ago

marcstern14 commented 3 months ago

Subtitles do not work when dcc.Graph() config toggles from config={editable: True} to config={editable: False}. Standalone it works as expected, and subtitle is the only layout feature that is affected by this. The bug only occurs going from True to False.

def plot_config(is_none=False):
    if not is_none:
        return {
            "displaylogo": False,
            "modeBarButtonsToRemove": ["zoom", "pan", "zoomIn", "zoomOut", "autoScale", "lasso2d", "select2d", "toImage"],
            "edits": {
                "axisTitleText": True,
                "legendPosition": True,
                "titleText": True
            }
        }

    return {
        "displayModeBar": False,
        "staticPlot": True,
        "editable": False
    }

Video for added clarity Description: On launch, the plot has no data, and is not editable, which is the desired behavior. Then off screen I select some filters which populate the chart with data. The subtitle for this chart is set to editable, and I can edit it as expected. Then I remove data from the chart, and it renders the same chart and settings as the chart on launch, except here the subtitle is not reset, and is editable. ScreenRecording (2)