Hi,
I am using TeeChart Pro v8.02 VCL in Delphi6
I am trying to use the ContourSeries and fill the contours as is done in the TeeDemo program (see Tee8New -> Welcome->New In Series -> Contour -> Filled). This works ok if the series data comes from FillSampleValues BUT when I fill the data by reading an ASCII file the data are cleared when I execute this code: ContourSeries1.Brush.Style:=bsClear
My test program is mostly copied section from the demos...
I use this routine to fill the contours:
If CheckBox1.Checked then
ContourSeries1.Brush.Style:=bsSolid
Else
ContourSeries1.Brush.Style:=bsClear;
and I use this to read the data:
begin
With SeriesTextSource1 do
begin
Series := SurfaceSeries1;
SeriesTextSource1.HeaderLines := 1;
Fields.Clear;
AddField('X',1);
AddField('Y',2);
AddField('Z',3);
FieldSeparator := #9;
DecimalSeparator := '.';
FileName := 'test.txt';
Active := True;
end;
ContourSeries1.DataSource := SurfaceSeries1;
end;
I have found that the only way to keep the data with a ContourSeries1.Brush.Style:=bsClear statement is to use a ContourSeries AND a SurfaceSeries in the same Chart. The SurfaceSeries can set set to not active. The data must be loaded into the SurfaceSeries (as in the above routine).
What I am really trying to do is fill only one of the contour levels. To do this I tried this:
procedure TForm1.ContourSeries1GetLevel(Sender: TContourSeries;
LevelIndex: Integer; var Value: Double; var Color: TColor);
begin
/ Only color Level 3
If (LevelIndex=1) then
Color:=clBlue
Else
Color := clNone
end;
This also only works if I fill the ContourSeries with FillSampleValues but... When I use real data (even when I load the data into a SurfaceSeries first) the statement Color := clNone does not work.
I am I doing something wrong or is this a bug?
Thanks,
Bob
Contour fill problem
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Bob,
Could you please send us a simple example project we can run "as-is" to reproduce the problem here.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Could you please send us a simple example project we can run "as-is" to reproduce the problem here.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 18
- Joined: Fri Nov 15, 2002 12:00 am
example program
Hi,
Thanks much for the response. I will send an example program tonight (in about 9 hrs) when I get back.
Thanks,
Bob
Thanks much for the response. I will send an example program tonight (in about 9 hrs) when I get back.
Thanks,
Bob
-
- Newbie
- Posts: 18
- Joined: Fri Nov 15, 2002 12:00 am
Test program uploaded
Hi,
While working through my test program I found some info on the forum suggesting that I can use "SeriesTextSource1.LoadFromFile" instead of
"SeriesTextSource1.Active := True"
This seems to stop the data from being cleared when I click the solid checkbox but...
With LoadFromFile the series colors seem to turn to black&white and the fill option no longer works.
Strange... I guess I must be something wrong!
Eventually, I would like to have only one level filled with color (see my "Fill only Level 3" checkbox).
Thanks for looking at this,
Bob
While working through my test program I found some info on the forum suggesting that I can use "SeriesTextSource1.LoadFromFile" instead of
"SeriesTextSource1.Active := True"
This seems to stop the data from being cleared when I click the solid checkbox but...
With LoadFromFile the series colors seem to turn to black&white and the fill option no longer works.
Strange... I guess I must be something wrong!
Eventually, I would like to have only one level filled with color (see my "Fill only Level 3" checkbox).
Thanks for looking at this,
Bob
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Bob,
Thanks for the example project. I could reproduce the issue here and it seems a bug to me. I've added it (TV52013279) to the bug list to be fixed for next releases.
Thanks for the example project. I could reproduce the issue here and it seems a bug to me. I've added it (TV52013279) to the bug list to be fixed for next 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 |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 18
- Joined: Fri Nov 15, 2002 12:00 am
Contour fill bug
Hi,
Do you think this bug will be fixed in the near future?
If so, is there a way I can track this bug nr? I don't see tacking nrs in the "Lat est vision Information".
Is there a way to draw a region on the chart so I can manually fill in the contour segments? I can read each level and get the pixel coordinates to the contour segments... I would be more than happy if I could somehow use this data to draw a matching region on the plot so it looks like the contour segment is filled.
Thanks
Bob
Do you think this bug will be fixed in the near future?
If so, is there a way I can track this bug nr? I don't see tacking nrs in the "Lat est vision Information".
Is there a way to draw a region on the chart so I can manually fill in the contour segments? I can read each level and get the pixel coordinates to the contour segments... I would be more than happy if I could somehow use this data to draw a matching region on the plot so it looks like the contour segment is filled.
Thanks
Bob
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Bob,
I can't give you an estimate date. However, I've added this is as a high priority item and since there are other contour fill related issues, I imagine that it's likely to be fixed sometime soon.Do you think this bug will be fixed in the near future?
We haven't done so with current VCL. However we started including issue tracking numbers in the release notes with other TeeChart versions releases and also have done so for v8.03 which currently is in release candidate stage. I'll send you an e-mail with the URL for downloading it.If so, is there a way I can track this bug nr? I don't see tacking nrs in the "Lat est vision Information".
You could try using Chart1.Canvas.Polygon method for that.Is there a way to draw a region on the chart so I can manually fill in the contour segments? I can read each level and get the pixel coordinates to the contour segments... I would be more than happy if I could somehow use this data to draw a matching region on the plot so it looks like the contour segment is filled.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 18
- Joined: Fri Nov 15, 2002 12:00 am
Contour fill bug
Hi,
If I use the Canvas.Polygon method is it possible to do a fill with a semi-transparent color (set at 50% or so)?
I think TeeChart is a very powerful wonderful tool and the forum/support makes it priceless!
Thanks again for the help,
Bob
If I use the Canvas.Polygon method is it possible to do a fill with a semi-transparent color (set at 50% or so)?
I think TeeChart is a very powerful wonderful tool and the forum/support makes it priceless!
Thanks again for the help,
Bob
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Bob,
http://www.teechart.net/support/viewtopic.php?t=3191
To achieve that you should use canvas blending as in the example I posted here:If I use the Canvas.Polygon method is it possible to do a fill with a semi-transparent color (set at 50% or so)?
http://www.teechart.net/support/viewtopic.php?t=3191
Thank you very muchI think TeeChart is a very powerful wonderful tool and the forum/support makes it priceless!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |