PDA

View Full Version : New to Flex: Chart/Table Question


tguy895
06-09-2009, 04:47 PM
I have the following code:



public function highlightRow(e:ChartItemEvent):void{

var index:int = e.hitData.chartItem.index;

myGrid.scrollToIndex(index);

myGrid.selectedIndex = index;



This block of code basically take a point on a line scatter chart and matches it to the corresponding points in an adjacent table.



What I want to do is the opposite: take the points in the table and correspond it to a point on the chart. I currently have a code similar to the above one:



public function highlightRow(e:ChartItemEvent):void{

var index:int = e.hitData.chartItem.index;

myChart.scrollToIndex(index);

myChart.selectedIndex = index;





For some reason, it does not work. Any help?

P.S The first block of code does work