This is a migrated thread and some comments may be shown as answers.

PDF chart does not consider missing rows in input data list

1 Answer 168 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rakesh
Top achievements
Rank 1
Rakesh asked on 02 Feb 2012, 08:27 AM

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

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 02 Feb 2012, 09:44 AM
Hello,

Our system indicates that you have opened a duplicate forum post, and a support ticket. To avoid duplicate posts, we can continue our communication in the support ticket in question.

Kind regards,
Yavor
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Rakesh
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or