Page 1 of 1

TColorLineTool in legend?

Posted: Wed Jun 13, 2018 3:57 pm
by 16482438
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

Re: TColorLineTool in legend?

Posted: Thu Jun 14, 2018 10:59 am
by yeray
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.

Re: TColorLineTool in legend?

Posted: Fri Jun 15, 2018 12:01 pm
by 16482438
That trick is really a good idea, thanks Yeray.