Page 1 of 1

TreeMap Series - OnClick - ValueIndex always Zero...

Posted: Mon May 31, 2010 5:07 am
by 10550242
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

Re: TreeMap Series - OnClick - ValueIndex always Zero...

Posted: Mon May 31, 2010 9:45 am
by yeray
Hi Bradley,

Yes, you are right. Please note that this is a quite new series and it would probably need some improvements.
I've added it to the wish list to be implemented in future releases (TV52014920).

Re: TreeMap Series - OnClick - ValueIndex always Zero...

Posted: Mon May 31, 2010 1:00 pm
by 10550242
Hello Yeray,

Can you provide a rough idea when this might be patched? It is a fairly important feature to us.

Bradley MacDonald

Re: TreeMap Series - OnClick - ValueIndex always Zero...

Posted: Tue Jun 01, 2010 10:18 am
by yeray
Hi Bradley,

We've taken a deeper look at it and we've already implemented it so it will be available in the next maintenance release.
As you are a source code customer, I'll send you the unit with the changes to the mail account you have registered in this forums.