Lazarus

Programming => Graphics and Multimedia => TAChart => Topic started by: Nicole on January 19, 2023, 05:27:03 pm

Title: [solved] TAChart - color me!
Post by: Nicole on January 19, 2023, 05:27:03 pm
There is a TAChart with a handful or series and some axes.
These axes uses transforming.

Everything works fine. What does not work:
I want the axes showing the same color as the series which it displays.
e.g. one series is colored blue. I want the fonts of its axes or may be the axes wall too - being blue as well.

I set everything to "blue": axes, font, color.... and much more.
The coloring of my added axes stays default.

What can I do?

(Lazarus 2.2.4 under Win 7)
Title: Re: TAChart - color me!
Post by: wp on January 19, 2023, 07:05:02 pm
These are the settings that you must change in order to color an axis and its labels in - say - red:

Code: Pascal  [Select][+][-]
  1. Axis.Title.LabelFont.Color := clRed;
  2. Axis.Marks.LabelFont.Color := clRed;
  3. Axis.TickColor := clRed;
  4. Axis.AxisPen.Color := clRed;
  5. Axis.AxisPen.Visible := true;   // <----- DO NOT FORGET THIS ONE
Title: Re: TAChart - color me!
Post by: Nicole on January 19, 2023, 07:39:22 pm
Code: [Select]
[quote author=wp link=topic=61911.msg467408#msg467408 date=1674151502]
Axis.AxisPen.Visible := true;   // <----- DO NOT FORGET THIS ONE
[/quote]

THIS was the clou, thank you so much!
TinyPortal © 2005-2018