Recent

Author Topic: [SOLVED] How to change the background of mark labels?  (Read 4707 times)

CM630

  • Hero Member
  • *****
  • Posts: 1676
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
[SOLVED] How to change the background of mark labels?
« on: September 17, 2012, 02:34:48 pm »
In all examples (i.e. http://wiki.freepascal.org/TAChart_Tutorial:_ListChartSource,_Logarithmic_Axis,_Fitting) and demos the backgroung of pointers is yellow. This seems to be the default value.
How to remove the background of the pointers (both the background and the border of the box)?
It would be useful to know how to change the background from yellow to sth. else.
« Last Edit: September 18, 2012, 10:24:36 am by paskal »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: How to change the background color for pointers?
« Reply #1 on: September 17, 2012, 03:20:50 pm »
Quote
backgroung of pointers is yellow
Pointers are red round dots. You probably mean labels.

Label background can be changed with LabelBrush property,
label border can be changed with Frame property.

See http://wiki.lazarus.freepascal.org/TAChart_documentation#Mark_labels

CM630

  • Hero Member
  • *****
  • Posts: 1676
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: How to change the background color for pointers?
« Reply #2 on: September 18, 2012, 10:23:51 am »
If I get it right, the exact name should be "Mark labels"?

So for the frame I used ls.marks.frame.visible:=false;
To remove the background I used ls.marks.labelbrush:= Chart1.backcolor; It worked, because the background area is transparent (by default).
To change the font color- ls.marks.labelfont.color:= somecolor;
« Last Edit: September 18, 2012, 10:25:39 am by paskal »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: [SOLVED] How to change the background of mark labels?
« Reply #3 on: September 18, 2012, 11:27:01 am »
Quote
If I get it right, the exact name should be "Mark labels"?
Yes.

Quote
To remove the background I used ls.marks.labelbrush:= Chart1.backcolor;
It is better to use ls.Marks.LabelBrush.Style := bsClear

 

TinyPortal © 2005-2018