Chart series labels

Stimulsoft Reports.WEB discussion
Post Reply
cbrydon
Posts: 173
Joined: Fri May 30, 2014 4:37 pm

Chart series labels

Post 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
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Chart series labels

Post by Lech Kulikowski »

Hello,

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

Also, please check that the ShowSeriesLabels=FromSeries.

Thank you.
cbrydon
Posts: 173
Joined: Fri May 30, 2014 4:37 pm

Re: Chart series labels

Post by cbrydon »

Thank You Lech - that works! I should have known to try SeriesLabels with proper case.

Cheers,
Carl
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Chart series labels

Post by Lech Kulikowski »

Hello

We are always glad to help you!

Thank you.
Post Reply