Hello :),
I’m trying to catch the legend selection in a pie chart and this return me None.
I tried to do to the same with the legend of a scatter plot and it was ok .
Here is what I tried :
@app.callback(
Output('seletedItem','children'),
[Input('pie_chart','restyleData')])
def getSelectedLegend(selected):
print(selected)
raise PreventUpdate
Anyone can help me ?
bmeyer
March 12, 2021, 5:59pm
2
Hi Josiias. I’m having the same problem. Did you solve it?
I encountered this problem as well. I’ve just created a feature request for it in the following thread:
opened 02:26PM - 12 May 21 UTC
I would like to filter data based on the 'restyleData' attribute of pie charts (… the selection made in the legend), but currently callbacks on this attribute are not returning anything at all.
What would be perfect, for me at least, is to get a list of all of the labels that are currently selected in the pie chart (or something similar) as input parameter of the callback function that has 'restyleData' as an input dependency.
This is the first time I've ever done a feature request, so hopefully I've supplied you with enough information!
2 Likes