Question

I have an Extjs pie chart right now and I want each piece of the pie to be clickable, and once clicked, take me to a new page.

For example, the pie might have 3 pieces (1, 2, 3) and when user clicks on 1, it will take him/her to https://example.com/page?selected=1

I'm wondering what's the best way to go about this? Should I configure the pie's autoEl or implement an onClick function or is there a better way? I'm kind of new to Extjs.

Was it helpful?

Solution

you should be able to add a listener for itemmousedown when you define your pie chart series. From there there should be a way to determine which section was clicked on and open a dynamic url. Post code if you want more specific help!

Check out this question: ExtJS How to add a click event to Pie Chart pieces

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top