Histogram

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
kev
Newbie
Newbie
Posts: 42
Joined: Tue Apr 06, 2004 4:00 am
Location: Texas

Histogram

Post by kev » Wed Jan 18, 2006 8:20 pm

I have a histogram populated using AddXY from various arrays of data. I would like to be able to click on one of the values and determine which dataset that it came from. Is there any way to store additional info along with each data point that I could access later? Something similar to the "Tag" property of Builder components.

thanks,
Kev

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Jan 24, 2006 9:02 am

Hi Kev,

the only way I can think of is by using the label parameter (of the AddXY method) to save this info, you can then set the axis labels style to talValue so the labels will be hidden, and then customize them or simply use custom labels.
Another way could be to use a fake series adding the same data points with the info in the labels, then set the color of the Series to clNone and ShowInLegend to false to hide it.

kev
Newbie
Newbie
Posts: 42
Joined: Tue Apr 06, 2004 4:00 am
Location: Texas

Histogram

Post by kev » Tue Jan 24, 2006 1:06 pm

I did try the Label approach, but abandoned it when all the Labels showed up on the chart. I didn't think of forcing the Labels to be hiden. I ended up creating an array that basically incremented with each AddXY call so that I could access them later via the ValueIndex of each data point. This is working well however I might revisit the idea later.

thanks,
Kev

Post Reply