Page 1 of 1
Bug TColorgird TAnnotation Combination
Posted: Wed Apr 06, 2011 9:17 am
by 9244864
Hello
I use TChart V7 vor VCL and test the TColorgrid for the first time.
I found the following bugs.
1. Grildline are cutted for negative values
x -10 10
y -10 10
For negative x and y you see no gird lines
for negative x only vertical lines are drawn
for negative y only horizontal lines are drawn
2. If the TColorgrid is the last series in chart
ALL TAnnotations get a background color from a color (the last?) of the TColorgrid.
I think in the TAnnotations drawing function forgets to set the correct brush.
3. No really a bug but no very uses full.
The Marks configuration with one "Draw every" makes no sense.
You get interesting patters!
A Draw every X and DrawEvery Y configuration would be better.
Best Regards
Andreas
Re: Bug TColorgird TAnnotation Combination
Posted: Wed Apr 06, 2011 10:09 am
by narcis
Hi Andreas,
1. Grildline are cutted for negative values
x -10 10
y -10 10
For negative x and y you see no gird lines
for negative x only vertical lines are drawn
for negative y only horizontal lines are drawn
First of all please have a look at how such series should be populated
here. Having said that, code below works fine for me here using TeeChart 2010 VCL. Does the code below work fine for you?
Code: Select all
uses TeeSurfa;
procedure TForm1.FormCreate(Sender: TObject);
var x, z: Integer;
Series1: TColorGridSeries;
begin
Series1:=TColorGridSeries.Create(Self);
Series1.IrregularGrid:=True;
Chart1.AddSeries(Series1);
for x:=-10 to 10 do
for z:=-10 to 10 do
Series1.AddXYZ(x, random, z);
end;
2. If the TColorgrid is the last series in chart
ALL TAnnotations get a background color from a color (the last?) of the TColorgrid.
I think in the TAnnotations drawing function forgets to set the correct brush.
I have been able to reproduce this one here with the code snippet below. I have added it (TV52015477) to the defect list to be fixed for future releases.
Code: Select all
uses TeeSurfa, TeeTools;
procedure TForm1.FormCreate(Sender: TObject);
var x, z: Integer;
Series1: TColorGridSeries;
begin
Series1:=TColorGridSeries.Create(Self);
Series1.IrregularGrid:=True;
Chart1.AddSeries(Series1);
for x:=-10 to 10 do
for z:=-10 to 10 do
Series1.AddXYZ(x, random, z);
Chart1.Tools.Add(TAnnotationTool.Create(Self));
(Chart1.Tools[0] as TAnnotationTool).Text:='My annotation';
end;
3. No really a bug but no very uses full.
The Marks configuration with one "Draw every" makes no sense.
You get interesting patters!
A Draw every X and DrawEvery Y configuration would be better.
Yes, this makes more sense for sequential series. I have added your request to the wish-list (TV52015478) to be considered for inclusion in future releases.
Re: Bug TColorgird TAnnotation Combination
Posted: Wed Apr 06, 2011 1:33 pm
by 9244864
Hi Narcís,
thank you for the answer.
Indeed your code works. The code
Series1->IrregularGrid=false;
was the problem.
As I see the TColorgrid works in general not in inregular grid mode with negative values (althought the values are filled regular means äquidistant).
The colorfields are show only in the positive quadrant.
This restriction is a great loss especially because the very beauty smoothing function does not work in irregular mode.
Working with negative values would be a wish of mine for the next version, too.
Bye
Andreas
Re: Bug TColorgird TAnnotation Combination
Posted: Wed Apr 06, 2011 1:40 pm
by narcis
Hi Andreas,
As I see the TColorgrid works in general not in inregular grid mode with negative values (althought the values are filled regular means äquidistant).
The colorfields are show only in the positive quadrant.
This restriction is a great loss especially because the very beauty smoothing function does not work in irregular mode.
Working with negative values would be a wish of mine for the next version, too.
I'm not sure about what do you mean here. Using TeeChart 2010 VCL (aka v9) here, which is the current TeeChart version, I get the chart in the image below which, in my opinion, works fine. Is this what you would expect?
- ColorGrid.jpg (113.03 KiB) Viewed 7102 times
It also works fine with SmoothBitmap enabled. You may want to have a look at the fully functional evaluation version of TeeChart 2010 VCL at
http://www.steema.com/evaluation/vcl.