Color not taken into account when Pointer.Style = psCross

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Verane
Newbie
Newbie
Posts: 23
Joined: Thu Jan 09, 2003 5:00 am

Color not taken into account when Pointer.Style = psCross

Post by Verane » Fri Feb 06, 2004 1:05 pm

Hi,

I use TeeChart Pro v6.01 with Delphi7.

I have a TeeChart with one point series.
If I write the following code :

Series2.Pointer.Style := psTriangle;
Series2.AddXY(2,2,'',clRed);
Series2.AddXY(3,3'',clRed);

I see 2 red triangle points on my teeChart as expected.

But if I replace the first line by :
Series2.Pointer.Style := psCross;

I see 2 cross points but instead of being red, they are grey...

Is it a bug ? Does anyone has already see that ??

Thank you by advance,

Verane.[/b]

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Feb 09, 2004 10:20 pm

Hi Verane,

this is not a bug, it's by default, you can change the color using the following code :

Code: Select all

Series1.Pointer.Pen.Color := clred;
Series1.Pointer.Style := psCross;
Series1.AddXY(2,2,'',clRed);
Series1.AddXY(3,3,'',clRed);

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Mon Feb 09, 2004 10:23 pm

Hi, Verane.

For some pointer styles (cross, diag-cross, star, ..) the internal drawing algorithm is using Pointer.Pen properties to draw specific symbol. If you want to change this, you could use the following code:

Code: Select all

  points1.Pointer.Style := psStar;
  points1.ColorEachPoint := True;
  points1.AddXY(2,2,'',clRed);
  points1.AddXY(3,3,'',clYellow);
  points1.AddXY(4,1,'',clLime);
Marjan Slatinek,
http://www.steema.com

Post Reply