Is it possible to draw a scatter plot using dcc.Graph that highlights selected data points saved from a previous session, while still showing all the possible data points ?
I tried by passing the saved selectedData to dcc.Graph at first first but then read it is read-only so it doesn’t update the scatter plot.
Thank you very much @Emmanuelle , I could make it work, at least partially. I have a callback that is triggered by selectData. Although my graph now shows the previously selected data using selectedpoints, the callback is not triggered. selectDatais None. Also, if i want to select more points, by holding the SHIFT key, the previous selection is overwritten.
yes I can do that for the callback. I am not sure how to solve the SHIFT key problem or how to “unselect” a previously selected point (coming from a dcc.Store). At the moment, the plot is drawn fine but when clicking on a “selected” point, it select it again.
Related is this issue - https://github.com/plotly/plotly.js/issues/1851, which I believe would solve this without workarounds - handling not just the points that are selected, but also the region / bounding box.
is this solved somehow? when I set selectedpoints as an output of a callback, the points are selected on the graph(they are highlighted) but selectedData remain null until I manually select something and then it overwrites what was set by selectedpoints. Im also not sure how to read selectedpoints (how to put it as an Input into a callback).