Page 1 of 1

How to 'name' a Colorline ?

Posted: Tue Apr 06, 2004 12:05 pm
by 6924132
I have two series in my chart which i show in a legend, that works fine.

Then i add a colorline to the chart, of which the x-axis has a datetime scale, which represents an important date (f.e. a deadline). I would like to show the user in the legend that that colorline represents f.e. 'Deadline'. However, the colorline doesn't have the "showinlegend" property, like the series, and i can't find another way of adding this to the legend (even not with the OnGetLegendText event)

Since i didn't succeed there, i tried to give my colorline a description hoping it would show in the x-axis, but this property is readonly :evil:

Can anybody give me a hint on how i can show my users what a colorline means ?

My other option is write my own legend in HTML, but i would like to do all the charting stuff with teechart.

Thanks in advance.

Posted: Tue Apr 06, 2004 3:21 pm
by Marjan
Hi.

How about adding another "fake" line series to chart and use it only as display item in chart legend ? Or alternatively, use the legend formatting tChart events to add custom legend item. I'd use the first approach because the end result will be color line + series title shown in legend.

Posted: Wed Apr 07, 2004 12:31 pm
by 6924132
Thanks !

Adding a fake fastline (line series get messed up in the legend in a 3D chart) series to my chart works nice.