Search code examples
apache-flexactionscript-3flex4flex-chartingflex-charts

How to get charts data on click of respective data lenged


what should i do to get chart's data on the click of respective data Legend. suppose i have array [{id:123, label:sales, year:2010},{id:124, label:refunds, year:2010}] for a column chart which has year in x-axis and sales iny-axis. two legend showing labels sales and refund.

What i want is to get the whole data (id:123, label:sales, year:2010) on clicking of the legend 'sales'.

What should i do?

I tried listening mouse click event and itemClick event.


Solution

  • This should get you headed in the right direction: http://blog.flexmp.com/2008/03/10/interactive-charting-legend-to-select-which-series-to-display/