Page 1 of 1

Legend individual text

Posted: Wed Jul 17, 2019 2:20 pm
by 15686059
Hi all,

is it possible to set an individual text at the legend in the chart?

By now I just can chose the Series Name, but that is very long and so it take too much place in the chart.

Thanks in advance!

Best regards,
Florian

Re: Legend individual text

Posted: Wed Jul 24, 2019 7:34 am
by 15686059
Hi all,

is there no solution for this problem?

Thanks in advance,
Florian

Re: Legend individual text

Posted: Fri Jul 26, 2019 9:56 am
by 15685014
Hello.
I'm not from Steema team but looks like I know what to do :) - handle GetLegendText event, something like that:

Code: Select all

private void tChart1_GetLegendText(object sender, GetLegendTextEventArgs e)
{
     //some checks (e. g. series index) if you need it
     if ((e.LegendStyle == LegendStyles.Series) && (e.Index == 0))
          //replace "-" with "" (or do whatever you like with legend text)
          e.Text = e.Text.Replace("-", "");
}
Good luck.