Bug TColorgird TAnnotation Combination

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Andy
Newbie
Newbie
Posts: 32
Joined: Wed Apr 18, 2007 12:00 am
Location: Germany Oldenburg
Contact:

Bug TColorgird TAnnotation Combination

Post by Andy » Wed Apr 06, 2011 9:17 am

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

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

Re: Bug TColorgird TAnnotation Combination

Post by Narcís » Wed Apr 06, 2011 10:09 am

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.
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

Andy
Newbie
Newbie
Posts: 32
Joined: Wed Apr 18, 2007 12:00 am
Location: Germany Oldenburg
Contact:

Re: Bug TColorgird TAnnotation Combination

Post by Andy » Wed Apr 06, 2011 1:33 pm

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

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

Re: Bug TColorgird TAnnotation Combination

Post by Narcís » Wed Apr 06, 2011 1:40 pm

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
ColorGrid.jpg (113.03 KiB) Viewed 6707 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.
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