TColorLineTool in legend?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.

TColorLineTool in legend?

Postby 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
paradise
Newbie
Newbie
 
Posts: 2
Joined: Wed Nov 29, 2017 12:00 am

Re: TColorLineTool in legend?

Postby 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.
Best Regards,

ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image ImagePlease read our Bug Fixing Policy
Yeray
Site Admin
Site Admin
 
Posts: 8429
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Re: TColorLineTool in legend?

Postby paradise » Fri Jun 15, 2018 12:01 pm

That trick is really a good idea, thanks Yeray.
paradise
Newbie
Newbie
 
Posts: 2
Joined: Wed Nov 29, 2017 12:00 am


Return to VCL

Who is online

Users browsing this forum: No registered users and 1 guest