TeeChart3.5 in ASP. Extent data series
Posted: Wed Aug 12, 2009 2:38 pm
I have a problem extending the data series (FastTrend).
When I extend the data in Chart.Series[0] (is a FastTrend object, I see the axis scale to display the new value, but the new point in the chart is not
connected with a line to the old points (that were already present in the Series[0]).
The TeeView properties:
TempChart = Session;
FastLine.XAxis shows DateTime objects
What am I missing to draw a line between the data that is already present and the new point added to the data series ?
The code I use:
protected void Page_Load(object sender, EventArgs e)
{
MemoryStream tmpChart;
if (Session["Chart"] == null)
{
InitNewChart(WebChart1.Chart);
tmpChart = new MemoryStream();
WebChart1.Chart.Export.Template.Save(tmpChart);
Session.Add("Chart", tmpChart);
}
else
{
// retrieve chart stored in Session object
tmpChart = (MemoryStream)Session["Chart"];
// force stream position to 0
tmpChart.Position = 0;
WebChart1.Chart.Import.Template.Load(tmpChart);
FastLine fs = (FastLine)WebChart1.Chart.Series[0];
fs.Add(DateTime.Now, 5);
}
When I extend the data in Chart.Series[0] (is a FastTrend object, I see the axis scale to display the new value, but the new point in the chart is not
connected with a line to the old points (that were already present in the Series[0]).
The TeeView properties:
TempChart = Session;
FastLine.XAxis shows DateTime objects
What am I missing to draw a line between the data that is already present and the new point added to the data series ?
The code I use:
protected void Page_Load(object sender, EventArgs e)
{
MemoryStream tmpChart;
if (Session["Chart"] == null)
{
InitNewChart(WebChart1.Chart);
tmpChart = new MemoryStream();
WebChart1.Chart.Export.Template.Save(tmpChart);
Session.Add("Chart", tmpChart);
}
else
{
// retrieve chart stored in Session object
tmpChart = (MemoryStream)Session["Chart"];
// force stream position to 0
tmpChart.Position = 0;
WebChart1.Chart.Import.Template.Load(tmpChart);
FastLine fs = (FastLine)WebChart1.Chart.Series[0];
fs.Add(DateTime.Now, 5);
}