TContourSeries - making art

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Sam F
Newbie
Newbie
Posts: 45
Joined: Wed Sep 10, 2008 12:00 am

TContourSeries - making art

Post by Sam F » Tue Nov 08, 2011 8:38 am

I have a display made of both TContourSeries and TColorGridSeries. It started hanging and I found out that when I feed in a (very) large array of data, with valid location values, but the data terms are all zero, then it hangs when I call Repaint.
I don't know which series flakes out the most about this.
In my experimenting I changed the zero value to be 5 and produced this lovely artwork that I've attached. I've now got a check in my code locally, so this won't happen again for me, but I thought I'd share.
If the data term is non-constant, then it returns to normal behavior.
Attachments
Prettycolours.png
Making art with TContourSeries
Prettycolours.png (146.24 KiB) Viewed 5639 times

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TContourSeries - making art

Post by Yeray » Wed Nov 09, 2011 9:29 am

Hello Sam,

I think it's just the TContourSeries, not the TColorGridSeries. This is reproducing the hanging for me here:

Code: Select all

uses TeeSurfa;

var Contour: TContourSeries;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1.View3D:=false;
  Chart1.Legend.Visible:=false;

  Contour:=Chart1.AddSeries(TContourSeries) as TContourSeries;
  Contour.FillSampleValues(100);

  for i:=0 to Contour.Count-1 do
    Contour.YValue[i]:=0;
end;
I'm not sure about the meaning of having this series with all YValues as zero. Maybe you could explain it with a picture showing us the expected result, for example.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Sam F
Newbie
Newbie
Posts: 45
Joined: Wed Sep 10, 2008 12:00 am

Re: TContourSeries - making art

Post by Sam F » Thu Nov 10, 2011 12:45 am

There is no meaning - it was an error for me to be trying to contour a constant value across the whole chart.
Nevertheless, I thought I'd report TChart's confusion on the matter.

Post Reply