Plotly Sunburst OnClick Event

Asked
Active3 hr before
Viewed126 times

7 Answers

sunbursteventonclick
90%

I am trying to capture the mouse click events for Sunburst chart but have been unable to do it. Here’s an example of on-click and hover events for plotly.js https://codepen.io/etpinard/pen/eYYparg, is it possible to do the same with plotly.py,Is it now possible to capture on click events? I want to use these events to send out API-calls and displaying the results next to the sunburst plot.,Hi @Qahan this is not possible yet from Python but one the next releases of plotly.js, probably the next, should expose a click event which you can capture from Python as in https://plot.ly/python/click-events/. Please stay tuned, the related issue is https://github.com/plotly/plotly.js/issues/4338

I’m having a similar problem. Currently i’m pretty new to developing web applications. I prepared my data in Python using:

fig = px.sunburst(df, path = column_names)

fig.update_traces()

graphJson = json.dumps(fig, cls = plotly.utils.PlotlyJSONEncoder)
load more v
88%

I'm using sunburst from Plotly within React , My issue is on the event onClick , when this happens at the second level the chart restyled as default, exists any way when on Click method set as default false the restyle object?,Connect and share knowledge within a single location that is structured and easy to search., Why bother maintaining a road bike for summer and a mountain bike for winter rather than two complete sets of wheels (as with cars) on a cyclocross?

Pretag
 Pretag team - issue, fix, solve, resolve
72%

Please see the following example and a workaround I came up with using onclick, which I first posted here:,Currently it seems that for sunburst plots the 'plotly_click' event_data is only available after clicking the root and leafs of the plot.,I can understand they want to use a separate event, because when you click on end level leaf the click event is still fired when there is no zoom happening.

load more v
65%

For modifying the chart at runtime. See the class reference.,Feel free to search this API through the search bar or the navigation tree in the sidebar.,Fires when the series is clicked. One parameter, event, is passed to the function, containing common event information. Additionally, event.point holds a pointer to the nearest point on the graph.

Pretag
 Pretag team - issue, fix, solve, resolve
75%

Determines whether or not a colorbar is displayed for this trace. Has an effect only if colorsis set to a numerical array.,hoverinfo – Determines which trace information appear on hover. If none or skip are set, no information is displayed upon hovering. But, if none is set, click and hover events are still fired.,Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels.

Pretag
 Pretag team - issue, fix, solve, resolve
40%

plotly sunburst javascript

Pretag
 Pretag team - issue, fix, solve, resolve
22%

Pretag
 Pretag team - issue, fix, solve, resolve

Other "sunburst-event" queries related to "Plotly Sunburst OnClick Event"