TreeMap Series - OnClick - ValueIndex always Zero...
Posted: Mon May 31, 2010 5:07 am
Hello,
I have been playing with the TreeMap series. Very nice and fairly easy to use - now that I have found the sample projects.
However, once piece of code - the OnClick Event does not seem to be working as I would expect.
When I run the OnClick (by clicking on various parts of the Chart) I always get a value of Zero for the ValueIndex. I thought this was supposed to be the value pointing to the item in the Series that was clicked?
procedure TForm_OutputTreeMapView.Chart_TreeMapClickSeries(Sender: TCustomChart;
Series: TChartSeries; ValueIndex: Integer; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
===> If TDirInfo(CurrNode.Data).DirSize = TTreeMapSeries(Series).Item[ValueIndex].Value Then Begin
This line of code is always wrong - because ValueIndex is always zero...
Is this a bug in the new component? Or do I have to determine which item on the TreeMap was clicked in a different way?
Any thoughts would be appreciated.
Bradley MacDonald
TimeAcct Information Systems
brad_AT_timeacct_DOT_com
I have been playing with the TreeMap series. Very nice and fairly easy to use - now that I have found the sample projects.
However, once piece of code - the OnClick Event does not seem to be working as I would expect.
When I run the OnClick (by clicking on various parts of the Chart) I always get a value of Zero for the ValueIndex. I thought this was supposed to be the value pointing to the item in the Series that was clicked?
procedure TForm_OutputTreeMapView.Chart_TreeMapClickSeries(Sender: TCustomChart;
Series: TChartSeries; ValueIndex: Integer; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
===> If TDirInfo(CurrNode.Data).DirSize = TTreeMapSeries(Series).Item[ValueIndex].Value Then Begin
This line of code is always wrong - because ValueIndex is always zero...
Is this a bug in the new component? Or do I have to determine which item on the TreeMap was clicked in a different way?
Any thoughts would be appreciated.
Bradley MacDonald
TimeAcct Information Systems
brad_AT_timeacct_DOT_com