SeriesColor and ColorEachPoint

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Spirale
Newbie
Newbie
Posts: 4
Joined: Mon Jan 16, 2006 12:00 am

SeriesColor and ColorEachPoint

Post by Spirale » Mon Jan 23, 2006 3:46 pm

Could it be possible without to much work to plot a TPointSeries or TLineSeries who could have in the same time :
- different drawing color for each point (as when ColorEachPoint iis selected)
- the SeriesColor property drawn into the legend area.

In the current version the property ColorEachPoint disables the drawing of the color area in the legend. This beahviour remains quite mysterious for me.

My purpose is to be able to colorize points in a special color when selected or when their coordinates have special properties.

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

Post by Narcís » Mon Jan 23, 2006 4:16 pm

Hi Spirale,

This works fine here using v7.06, latest maintenance release available at our Customer Download Area, and this code:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Series1.ColorEachPoint:=true;

  Series1.Add(random,'',clRed);
  Series1.Add(random,'',clBlue);
  Series1.Add(random,'',clYellow);
  Series1.Add(random,'',clGreen);
end;
Which version are you using?
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

Spirale
Newbie
Newbie
Posts: 4
Joined: Mon Jan 16, 2006 12:00 am

I disagree

Post by Spirale » Tue Jan 24, 2006 4:30 pm

I forgot to tell you, I wanted the name of the serie in the legend.

Thus, when I select this style for the legend (lsSeries) and if the property ColorEachPoint is also selected, I can't see a colorized box near the name of the serie in the legend area.

Is it possible for me to change this behaviour ?

NOTA : I use the very last release (7.0.6) and I've checked what I've told you through the TeeChart Office.

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

Post by Narcís » Wed Jan 25, 2006 8:29 am

Hi Spirale,

I'm afraid this is not possible when ColorEachPoint is set to true as the legend doesn't know which colour should display for each series. To achieve what you request you may use the approack shown at the "Symbol OnDraw" example at TeeChart's features demo, available at its program group. The example can be found at What's new?\Welcome !\New in Legend.
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

Spirale
Newbie
Newbie
Posts: 4
Joined: Mon Jan 16, 2006 12:00 am

It's works fine

Post by Spirale » Wed Jan 25, 2006 1:33 pm

Thanks a lot, it works perfectly using the OnDraw event property.

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

Post by Narcís » Wed Jan 25, 2006 2:00 pm

Hi Spirale,

You're welcome. I'm glad to hear that fitted your needs.
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