Hi,
I'm trying to render a chart inside the Telerik report. I'm also rendering the same chart in my MVC web application using Telerik Extensions for ASP.NET MVC chart control. But both are giving different charts.
Here is the code:
Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender;
Telerik.Reporting.Chart defChart = (Telerik.Reporting.Chart)procChart.ItemDefinition;
defChart.Series.Clear();
int
xAxisIndicesCount = (from cdsl
in
chartDataSourceList select cdsl.XAxisValue).Distinct().Count();
defChart.PlotArea.XAxis.Items.Clear();
defChart.PlotArea.XAxis.AutoShrink =
false
;
defChart.PlotArea.XAxis.AutoScale =
false
;
defChart.PlotArea.XAxis.AddRange(0, (xAxisIndicesCount > 0) ? xAxisIndicesCount - 1 : 0, 1);
defChart.SeriesOrientation = seriesOrientation;
defChart.DataGroupColumn =
"GroupingValue"
;
defChart.PlotArea.XAxis.DataLabelsColumn =
"XAxisValue"
;
defChart.Legend.Appearance.GroupNameFormat =
"#VALUE"
;
defChart.IntelligentLabelsEnabled =
true
;
procChart.DataSource = chartDataSourceList;
Essentially if you can compare the charts I have attached, in the PDF chart, the series columns are misplaced. Please check and revert if you need further clarifications. I hope you will better be able to figure the issue by comparing the charts, than explaining it here. Please revert asap.
Thanks