Creating interactive areas on a WPieChart
Added by Edwin Bentley over 10 years ago
It may be that I'm overly complicating this, but I don't really understand how to implement having the data segments on a pie chart be interactive.
What I really want to be able to do, is when a segment is clicked - to be able to open up some sort of popup widget with more information about that particular data field.
I just can't see a way that this can be easily done, and how you go about adding an WAbstractArea onto a data segment.
Any pointers would be greatly appreciated.
Replies (1)
RE: Creating interactive areas on a WPieChart - Added by Koen Deforche over 10 years ago
Hey Edwin,
This isn't well done in WPieChart (on our behalf), but there's a way to do this by specializing addDataPointArea()
This function will be called for every pie for which ToolTip data is available in the model (since that's how a tooltip can be shown), but it allows you to hook up other functionality to the area like reacting to events.
Regards,
koen