Pre-select point in graph on loading of


I am wondering if it is possible to pre-select a specific point in a graph on loading of the app. Is there an easy way to do this?

Hi @Illmatic, untested solution here but you could add a hidden div in the layout which would trigger a callback updating the clickData of your dcc.Graph. This callback would be executed when launching the app. Would that be a solution for you? What do you want to pre-select a point for, though?

Hi @Emmanuelle I actually tried to solve this issue about an error that is thrown by Dash when the app is loading that clickData is NoneType. Although that error did not affect the functionality of the app in any way I tried to clean everything up. So I switch clickData with selectedData and thought if I would pre-select a point on loading the app the NoneType issue should be resolved. At the end it was actually easy to pre-select a specific point (e.g. the very first one) using

selectedpoints = [0]

in the go.Scatter definition.

However that did not resolve the NoneType issue. For some reason even though a point is selected from the beginning selectedData returns a NoneType when loading the app.