Source code change to TMarksTipTool

Ideas and wishes for TeeChart
Post Reply
dataview
Newbie
Newbie
Posts: 11
Joined: Fri Jun 15, 2007 12:00 am

Source code change to TMarksTipTool

Post by dataview » Mon Oct 01, 2007 6:32 pm

Hi,

I made a source code change to TMarksTipTool in order to work around a problem.

The problem is that when you add null values to a line or point series, that the null values act as zero values for the purpose of calculating plot limits. The result is a lower plot limit of zero. The solution that I read in a previous post is instead of adding null values, add values that have previously been added (so they don't affect the plot limits calculation), but add them with a color of clNone. The chart looks correct, but the "invisible" series points were popping up when I used the marks tip tool. I changed the source code to skip any series with a ValueColor of clNone. Now everything works correctly. I don't require it now, but a similar thing could be added for when a series is clicked.

Regards,

Bill

Here is the updated FindClickedSeries code:

Procedure FindClickedSeries;
var t : Integer;
tmpClickedSeries : TChartSeries;
begin
for t:=ParentChart.SeriesCount-1 downto 0 do // 6.01
begin
tmpClickedSeries:=ParentChart[t];

if tmpClickedSeries.Active then
begin
tmp:=tmpClickedSeries.Clicked(x,y);
if tmp<>-1 then
if tmpClickedSeries.ValueColor[tmp]<>Graphics.clNone then
begin
tmpSeries:=tmpClickedSeries;
break;
end
else
tmp:=-1;
end;
end;
end;

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 02, 2007 8:08 am

Hi Bill,

Thank you very much for your suggestion. I've added it to our wish-list to be reviewed and considered for inclusion in future releases.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply