Description
In Dash, the Graph
component stores the data from hover, click, and selection events as part of the component's state and passes that to the user as hoverData
, clickData
, selectionData
.
In some cases, the user may want to initialize their app with a point already "clicked", a region "preselected", or a point "hovered".
This is related to "Customized Click, Hover, and Selection Styles". The viewer will know that the graph has been pre-selected, clicked, or hovered through whatever custom styles the developer added.
Ideally, this API would match the same event data. For example, when hovering over a point, the event data might be:
{
"points": [{"x": 1, "y"; 4}]
}
Ideally, the user would be able to pass that in as part of the figure to trigger those styles themselves. That's how the Dash API currently works although styles are not applied:
Graph(
figure={...},
hoverData={"points": [{"x": 1, "y": 4}]}
)
cc @alexcjohnson @etpinard @monfera @jackparmer @charleyferrari