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);
}
TeeChart3.5 in ASP. Extent data series
-
- Newbie
- Posts: 11
- Joined: Mon Mar 23, 2009 12:00 am
Re: TeeChart3.5 in ASP. Extent data series
Hello marcoIpcos,
I made a simple example using last verision of TeeChartFor.Net 3.5 in Asp and your code, please check that next code works as you want in your application:
If this code doesn't do what you want, please explain exactly what is your problem or send a us a simple project that appears this problem. You could attach your projects directly in the forums post.
Thanks,
I made a simple example using last verision of TeeChartFor.Net 3.5 in Asp and your code, please check that next code works as you want in your application:
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
System.IO.MemoryStream tmpChart;
DateTime today = DateTime.Today;
TimeSpan oneday = TimeSpan.FromDays(1);
Steema.TeeChart.Styles.FastLine fs = new Steema.TeeChart.Styles.FastLine(WebChart1.Chart);
Random rnd = new Random();
WebChart1.Chart.Axes.Bottom.Labels.Angle = 90;
for (int i = 0; i < 10; i++)
{
fs.Add(today, rnd.Next(100));
today += oneday;
}
fs.YValues.Order = Steema.TeeChart.Styles.ValueListOrder.Descending;
fs.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None;
if (Session["Chart"] == null)
{
tmpChart = new System.IO.MemoryStream();
WebChart1.Chart.Export.Template.Save(tmpChart);
Session.Add("Chart", tmpChart);
}
else
{
DateTime date1 = DateTime.Today;
// retrieve chart stored in Session object
tmpChart = (System.IO.MemoryStream)Session["Chart"];
//force stream position to 0
tmpChart.Position = 0;
WebChart1.Chart.Import.Template.Load(tmpChart);
Steema.TeeChart.Styles.FastLine fs1 = (Steema.TeeChart.Styles.FastLine)WebChart1.Chart.Series[0];
fs1.Add(date1.AddDays(11), 5);
}
}
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 11
- Joined: Mon Mar 23, 2009 12:00 am
Re: TeeChart3.5 in ASP. Extent data series
Thanks, it solved my problem!!