TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
paradise
- Newbie
- Posts: 2
- Joined: Wed Nov 29, 2017 12:00 am
Post
by paradise » Wed Jun 13, 2018 3:57 pm
Hi,
Is there a way to add a TColorLineTool in its owner chart's legend?
I draw a text manually close to the line (see code below) but I'd prefer to move it onto legend frame.
Code: Select all
_x := Round(ChartB.BottomAxis.CalcXPosValue(myValue));
ChartB.Canvas.TextOut(
_x + OFFSET,
Round(ChartB.LeftAxis.CalcYPosValue(ChartB.LeftAxis.Maximum)),
myLegend,
True
);
I'm using TeeChart Pro v2017.23.171221 - VCL version
Thanks for your help
-
Yeray
- Site Admin
- Posts: 9614
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu Jun 14, 2018 10:59 am
Hello,
If you want to draw the ColorLine value into the legend, the easiest way would be to create a dummy series (without data) and to change the series name at the colorline onchange event.
Don't hesitate to let us know if you still find problems with it.
-
paradise
- Newbie
- Posts: 2
- Joined: Wed Nov 29, 2017 12:00 am
Post
by paradise » Fri Jun 15, 2018 12:01 pm
That trick is really a good idea, thanks Yeray.