Hi, we are evaluating Telerik Reporting, and have come across a few problems using the Chart.
First what I'm trying to accomplish:
A simple barchart, where the data is DateTime on the x-axis and integer og the y-axis.
The chart must also display Time in a realistic matter.
The code is in the chart1_NeedDataSource(..,..) eventhandler.
When I am binding an ArrayList with approx 40 items the report takes about 2 seconds to render.
However if the ArrayList is 250 items the report takes about 45 seconds!! to render.
If I set the x-axis labels manually to empty strings it seems to go about a few seconds faster.
The ArrayList contains a custom class with 2 properties with datatypes DateTime and Integer.
For instance if I originally have an ArrayList with only 2 items, and the datetimes are yy-mm-dd 09:45:00 and yy-mm-dd 09:57:00
then i create an ArrayList with all the minutes between 45 and 57 (Integer=0), and thus have an ArrayList with 13 items.
Retrieving data and manipulating ArrayList takes basically no time at all.
How I bind:
al = db.getChartData();
//al = fillEmptyMinutes(al); //
((Telerik.Reporting.Processing.Chart)sender).DataSource = al;
Telerik.Reporting.Processing.Chart chartItem = sender as Telerik.Reporting.Processing.Chart;
Telerik.Reporting.Chart chart = (Telerik.Reporting.Chart)chartItem.ItemDefinition;
chart1.Series[0].PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 270;
//chart.PlotArea.XAxis.AutoScale = false;
//chart.PlotArea.XAxis.AutoShrink = false;
//chart.PlotArea.XAxis.Clear();
//for (int i = 0; i < al.Count; i++)
//{
// chart.PlotArea.XAxis.AddItem(" ");
//}
Is the another more effecient way to display time-data like this?
In a perfect world I just want to send in the original ArrayList and set for instance
chart.Series[0].XAxis.DataType = DateTime; // or even DateTime.Minutes
Are there some other properties on the chart that can improve renderingtime?
I am using Q3 2008-version
Regards, John Pedersen
First what I'm trying to accomplish:
A simple barchart, where the data is DateTime on the x-axis and integer og the y-axis.
The chart must also display Time in a realistic matter.
The code is in the chart1_NeedDataSource(..,..) eventhandler.
When I am binding an ArrayList with approx 40 items the report takes about 2 seconds to render.
However if the ArrayList is 250 items the report takes about 45 seconds!! to render.
If I set the x-axis labels manually to empty strings it seems to go about a few seconds faster.
The ArrayList contains a custom class with 2 properties with datatypes DateTime and Integer.
For instance if I originally have an ArrayList with only 2 items, and the datetimes are yy-mm-dd 09:45:00 and yy-mm-dd 09:57:00
then i create an ArrayList with all the minutes between 45 and 57 (Integer=0), and thus have an ArrayList with 13 items.
Retrieving data and manipulating ArrayList takes basically no time at all.
How I bind:
al = db.getChartData();
//al = fillEmptyMinutes(al); //
((Telerik.Reporting.Processing.Chart)sender).DataSource = al;
Telerik.Reporting.Processing.Chart chartItem = sender as Telerik.Reporting.Processing.Chart;
Telerik.Reporting.Chart chart = (Telerik.Reporting.Chart)chartItem.ItemDefinition;
chart1.Series[0].PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 270;
//chart.PlotArea.XAxis.AutoScale = false;
//chart.PlotArea.XAxis.AutoShrink = false;
//chart.PlotArea.XAxis.Clear();
//for (int i = 0; i < al.Count; i++)
//{
// chart.PlotArea.XAxis.AddItem(" ");
//}
Is the another more effecient way to display time-data like this?
In a perfect world I just want to send in the original ArrayList and set for instance
chart.Series[0].XAxis.DataType = DateTime; // or even DateTime.Minutes
Are there some other properties on the chart that can improve renderingtime?
I am using Q3 2008-version
Regards, John Pedersen