Page 1 of 1

Chart series labels

Posted: Fri May 22, 2020 11:14 am
by cbrydon
Hi,

Is it possible to turn chart series labels on or off with code in the Before Print event of a report or chart?
I've tried the code below,

Chart1.Series[0].seriesLabels.visible = false;

but get the following error....

"The error of compilation is found in the 'BeforePrint' event of the 'Chart1' component:
'Stimulsoft.Report.Chart.IStiSeries' does not contain a definition for 'seriesLabels' and no extension method 'seriesLabels' accepting a first argument of type 'Stimulsoft.Report.Chart.IStiSeries' could be found (are you missing a using directive or an assembly reference?)"

I've changed the title of a chart with the following code...
Chart1.Title.Text = "New Chart Title"

I was hoping there would be similar syntax for turning series labels on or off. If it is possible would you be able to provide an example?

Thanks,
Carl

Re: Chart series labels

Posted: Mon May 25, 2020 8:07 am
by Lech Kulikowski
Hello,

Please check the following code:
Chart1.Series[0].SeriesLabels.Visible = false;

Also, please check that the ShowSeriesLabels=FromSeries.

Thank you.

Re: Chart series labels

Posted: Mon May 25, 2020 10:44 am
by cbrydon
Thank You Lech - that works! I should have known to try SeriesLabels with proper case.

Cheers,
Carl

Re: Chart series labels

Posted: Mon May 25, 2020 12:53 pm
by Lech Kulikowski
Hello

We are always glad to help you!

Thank you.