Page 1 of 1
SeriesColor and ColorEachPoint
Posted: Mon Jan 23, 2006 3:46 pm
by 9239955
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.
Posted: Mon Jan 23, 2006 4:16 pm
by narcis
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?
I disagree
Posted: Tue Jan 24, 2006 4:30 pm
by 9239955
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.
Posted: Wed Jan 25, 2006 8:29 am
by narcis
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.
It's works fine
Posted: Wed Jan 25, 2006 1:33 pm
by 9239955
Thanks a lot, it works perfectly using the OnDraw event property.
Posted: Wed Jan 25, 2006 2:00 pm
by narcis
Hi Spirale,
You're welcome. I'm glad to hear that fitted your needs.