Legend of dynamically added series in SSRS


https://www.nevron.com/Forum/Topic7044.aspx
Print Topic | Close Window

By Xavier Arul Kumar Arockiasamy - 12 Years Ago
Hi,

In Nevron Chart for SSRS, in addition to the series added in the design time, I am adding a new series in the code section of chart designer. Here is the code.

NChart chart = context.Document.Charts[0];
NLineSeries line1 = new NLineSeries();
line1.Values.Add(311000);
line1.Values.Add(332000);
line1.Values.Add(443000);
line1.Values.Add(444000);
chart.Series.Add(line1);

The newly added line is drawn on the chart, but the legend of the new series is not shown up. Only the legend of first series(added at design time) is shown up.

Please help me to resolve this.

Thanks,
Xavier
By Nevron Support - 12 Years Ago

Hi Xavier,

You need to display the new series on the Legned:

chart.DisplayOnLegend = context.Document.Legends[0];