react-plotly.js icon indicating copy to clipboard operation
react-plotly.js copied to clipboard

When changing data after selectbox I get WARN: unrecognized GUI edit: selections[0].xref

Open nadine-belanova opened this issue 2 years ago • 7 comments

Hi, I prepared a sample in sandbox:

https://codesandbox.io/s/elegant-water-k7q91m?file=/src/App.js

Steps to reproduce:

  1. Select some points with selectbox
  2. Click "Change Y" button
  3. There is "WARN: unrecognized GUI edit: selections[0].xref" in console

Maybe I use plotly incorrectly? Thanks for any help

nadine-belanova avatar Sep 14 '22 13:09 nadine-belanova

After further investigation I have found that this bug was introduced in plotly.js 2.13.3. It isn't caused by react-plotly.js itself.

Everything works fine when I downgrade plotly.js to 2.13.2. Can you confirm this is the case for you as well?

agusterodin avatar Sep 26 '22 15:09 agusterodin

Hi Jeff, thank you for helping me out. I have the same issue with plotly.js v2.13.2, but I've tried other versions and with plotly.js v2.12.1 everything works fine. So yes, the bug isn't caused by react-plotly.js. Thanks!

nadine-belanova avatar Sep 27 '22 08:09 nadine-belanova

I also got this warning message while deleting the selectedpoints attribute in the data props in order to trigger a new plot after a single click outside a selection box or lasso. The desired functionality was to avoid needing a double click to exit a selection.

Got the same "WARN: unrecognized GUI edit" message with plotly.js-basic-dist 2.16.1. Downgraded to v2.12.1 and the WARN message went away.

Pablongo24 avatar Nov 12 '22 02:11 Pablongo24

Have the same problem in v. 2.20.0

ppulwey avatar Mar 20 '23 11:03 ppulwey

Same problem on 2.22.0

higordearaujo-bsy avatar Jul 05 '23 18:07 higordearaujo-bsy

This does not fix the issue, but works around it:

  • Load plotly.js on your own
  • Configure Plotly
  • Use react-plotly.js's factory method to create the Plot component using the pre-configured Plotly
import Plotly from "plotly.js/dist/plotly"
import createPlotlyComponent from "react-plotly.js/factory"

Plotly.setPlotConfig({ logging: 0 })

const Plot = createPlotlyComponent(Plotly)

I would like to add that, for some cases, carefully maintaining PlotComponent's revision prop or plotly.js layout's *revision fields might also help.

heuripedes avatar Jul 09 '23 14:07 heuripedes

Experiencing a similar issue when attempting to save selected points in a useState variable using onSelected. This behavior persists in version 2.27.1

debatoshpm avatar Dec 04 '23 10:12 debatoshpm