Skip to content

Config not reactive in some cases #10

@cshaa

Description

@cshaa

Steps to reproduce

  1. Go to https://svelte-plotly-5lon9xrrn-m93as-projects.vercel.app/
  2. Click on “Enable Fullscreen”
  3. See that the button still says “Enable Fullscreen”, not “Disable Fullscreen“

Details

This is caused by plotly#6394Plotly.react ignores some changes in the config:

“Sometimes it works to change config via Plotly.react, sometimes it doesn't.”

Possible walkarounds

  1. Switch from Plotly.react to Plotly.newPlot every time config is updated.
  2. Add { ...element._context } to config. (No idea what this does, see the upstream ticket)
  3. Display and then immediately hide the Plotly logo to trigger a config update, as seen here and here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions