Group: Forum Members
Last Active: 3 Years Ago
Posts: 11,
Visits: 67
|
hi, Hi,
I have got an area chart with a series value which is a field in my dataset.
The legend for the chart is set to show the label of the series plus the label field of the value, seperated by a dash line, in the form of Group1 - Value1.
What I want is to only show the series label in the legend - only show Group1 - but if I leave the label field of the value empty, Nevron component still shows the dash (it shows Group1 - ) Is there a way around the issue?
Many thanks, Vahid
|
Group: Forum Members
Last Active: 7 days ago @ 6:37 AM
Posts: 3,055,
Visits: 4,058
|
Hi Vahid , Currently the only workaround for this issue is to use custom code to remove the trailing dash & nbsp ;- you can use the following code : using System; using System.Drawing; using Nevron.GraphicsCore; using Nevron.Chart; using Nevron.ReportingServices; namespace MyNamespace { /// <summary> /// Sample class /// </summary> public class MyClass { /// <summary> /// Main entry point /// </summary> /// <param name="context"></param> public static void RSMain(NRSChartCodeContext context) { NChart chart = context.document.Charts[0]; foreach (NSeriesBase series in chart.Series) { series.Name = series.Name.Trim(); if (series.Name.EndsWith("-")) { series.Name = series.Name.Substring(0, series.Name.Length - 1); series.Name = series.Name.Trim(); } } } } } (just copy paste the above code in the code tab of the SSRS designer)
Hope this helps let us know if you meet any problems or have any questions .
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 3 Years Ago
Posts: 11,
Visits: 67
|
Thank you very much. This did the trick!
|