Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Interactive Graphing &'customdata' in callbacks

$
0
0

@cyranothebard wrote:

Hi Dash Community,

I’m trying to add interactivity to my dashboard following the code examples given here: (https://dash.plot.ly/interactive-graphing). In the “Update Graphs on Hover” section the callbacks use this syntax to grab custom data defined in the figure for a callback update, country_name = hoverData[‘points’][0][‘customdata’]. I’m trying to adapt this for use in clickData using the same syntax. However, I keep getting a type error that says: “TypeError: string indices must be integers”. To me that would indicate that after [‘points’] all further sub-indexing would have to be integers. But that’s not the way the example code is doing things. Without being able to access that ‘customdata’ property I can’t update my figure properly. Best I can come up with is that there something about the ‘customdata’ property that I’m not using properly. But I haven’t been able to find any documentation to validate that hunch. Thoughts? Any assistance would be greatly appreciated.

-cyranothebard

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles