I have 2 fast line series, plotted them on the chart. Works great
I have added another fastline, associated a subtract function and the data source pointing to above mentioned 2 fastline series. Works great.
Now in realtime whenever I update my source 2 fastlines with another data point. ( of course data points added - point to the same datetime on x series)
the difference is not udpated on the fastline (the one that has the subtract function)
Should I be calling Invalidate or CheckDataSource on the series to show the diff?
Regards,
Vish
realtime data subtract function
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: realtime data subtract function
Hi Vish,
Yes, exactly. You should call CheckDataSource to recalculate the function series.
Yes, exactly. You should call CheckDataSource to recalculate the function series.
Best Regards,
Narcís Calvet / 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 |
Re: realtime data subtract function
That is working out fine.
Issue with Min and Max on Y axis.
The y-axis for the diff line is to Right Axis
Since I set the Axis to automatic, I thought it would scale properly. Most of the time it does and sometimes it shows the min as 0 and max as 100. My diff series range is in -2 to +3 only.
Please advise.
Issue with Min and Max on Y axis.
The y-axis for the diff line is to Right Axis
Since I set the Axis to automatic, I thought it would scale properly. Most of the time it does and sometimes it shows the min as 0 and max as 100. My diff series range is in -2 to +3 only.
Please advise.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: realtime data subtract function
Hi vk_nomura,
Can you please attach a simple example project with which we can reproduce the problem here?
Thanks in advance.
Can you please attach a simple example project with which we can reproduce the problem here?
Thanks in advance.
Best Regards,
Narcís Calvet / 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 |
Re: realtime data subtract function
I know what the problem is and here is the scenario:
When it comes to subtract function, as long as you have valid vaues, everything is fine. But when you have a null value for one of the data points, thats where I see the issue:
Example:
Series1 -> Datapoint1: x = 0 and y = 99
Series2 -> Datapoint1: x = 0 and y = 100
Subtract function returns 1(which is correct)
Series1 -> Datapoint2: x = 0 and y = 99
Series2 -> Datapoint2: x = 0 and y = null
Subtract function returns 99 -> this I do not want to see. I would rather see a "blank space" meaning no-paint. than 99. This messes up the graph.
Please advise.
Regards,
When it comes to subtract function, as long as you have valid vaues, everything is fine. But when you have a null value for one of the data points, thats where I see the issue:
Example:
Series1 -> Datapoint1: x = 0 and y = 99
Series2 -> Datapoint1: x = 0 and y = 100
Subtract function returns 1(which is correct)
Series1 -> Datapoint2: x = 0 and y = 99
Series2 -> Datapoint2: x = 0 and y = null
Subtract function returns 99 -> this I do not want to see. I would rather see a "blank space" meaning no-paint. than 99. This messes up the graph.
Please advise.
Regards,
Re: realtime data subtract function
The issue has been resolved. We had to do lot of data cleansing before we applied the it to the graph.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: realtime data subtract function
Hi vk_nomura,
I'm glad to hear you solved the issue. An option for supporting null values in a function is doing something like this:
I'm glad to hear you solved the issue. An option for supporting null values in a function is doing something like this:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Points points1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
Steema.TeeChart.Styles.Points points2 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
points1.Add(0, 99);
//points2.Add(0, 100);
points2.Add();
Steema.TeeChart.Functions.Subtract subtract1 = new Steema.TeeChart.Functions.Subtract();
Steema.TeeChart.Styles.Points points3 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
points3.Function = subtract1;
points3.DataSource = new object[] {points1, points2};
for (int i = 0; i < points3.Count; i++)
{
if (points1.IsNull(i) || points2.IsNull(i))
{
points3.SetNull(i);
}
}
}
Best Regards,
Narcís Calvet / 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 |