I'm making a (speed/time) line chart that has to support a very large
number of items (1 item per second, 3600 items for a one hour view).
The chart is taking 10 seconds to render, which is unacceptable for our
application.
I've tried to enable scrolling on the X axis and only render part of the chart, but it takes the same amount of time (10+ seconds) to update when scrolling.
I've also tried disabling the view state, which made the HTML go from 2MB to 7KB, but it still takes 10 seconds to render.
Is there some way to filter the items? For instance, the chart does not need to draw all 3600 items for a 500px wide chart. Can I filter the items before I populate the chart? How will zooming and scrolling work?
Using Q1 2009.
I've tried to enable scrolling on the X axis and only render part of the chart, but it takes the same amount of time (10+ seconds) to update when scrolling.
I've also tried disabling the view state, which made the HTML go from 2MB to 7KB, but it still takes 10 seconds to render.
Is there some way to filter the items? For instance, the chart does not need to draw all 3600 items for a 500px wide chart. Can I filter the items before I populate the chart? How will zooming and scrolling work?
Using Q1 2009.
<form id="Form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server"> |
<ContentTemplate> |
<telerik:RadChart ID="RadChart1" runat="server" AutoLayout="true"> |
<ClientSettings EnableZoom="false" ScrollMode="XOnly" XScale="50" /> |
<Series> |
<telerik:ChartSeries DataYColumn="Speed" Type="Line"> |
<Appearance> |
<LabelAppearance Visible="false"> |
</LabelAppearance> |
</Appearance> |
</telerik:ChartSeries> |
</Series> |
<Legend Visible="false"></Legend> |
<ChartTitle TextBlock-Text="Title"> |
</ChartTitle> |
</telerik:RadChart> |
</ContentTemplate> |
</asp:UpdatePanel> |
</form> |
protected void Page_Load(object sender, EventArgs e) |
{ |
if (!IsPostBack) |
{ |
DataTable dt = new DataTable(); |
dt.Columns.Add("speed", typeof(int)); |
Random random = new Random(); |
for (int i = 0; i < 3600; i++) |
{ |
DataRow row = dt.NewRow(); |
row[0] = random.Next(100); |
dt.Rows.Add(row); |
} |
RadChart1.DataSource = dt; |
RadChart1.DataBind(); |
} |
} |