Tee chart Series Visibility and downsampling questions
Tee chart Series Visibility and downsampling questions
There are few things i will like to ask
1) I have a Teechart where in I draw Line chart. The user can configure the lines to be displayed using contextmenu selection. I made line visible or invisble by setting series.visible to true or false. This works fine.
There is a Grid in our application on change of selection of row i will clear the series & add new data to the series . The problem here is the scale of the chart does not change when new data is displayed . This problem wont happen when I use legend checkboxe to show & hide the lines instead of my contextmenu. Please let me know what really happens when we select unselect legend checkbox which is different then my doing it by setting series visible.
2) Axis label when its a big no say more than 5 digit number I am not able to see the complete number i just see 4 digits also the axis title is not displayed.
3) I was trying to use downsampling I add the data to a temporary series & then set it to the line by setting its datasource. I notice that the series is not displayed due to this.
Thanks
1) I have a Teechart where in I draw Line chart. The user can configure the lines to be displayed using contextmenu selection. I made line visible or invisble by setting series.visible to true or false. This works fine.
There is a Grid in our application on change of selection of row i will clear the series & add new data to the series . The problem here is the scale of the chart does not change when new data is displayed . This problem wont happen when I use legend checkboxe to show & hide the lines instead of my contextmenu. Please let me know what really happens when we select unselect legend checkbox which is different then my doing it by setting series visible.
2) Axis label when its a big no say more than 5 digit number I am not able to see the complete number i just see 4 digits also the axis title is not displayed.
3) I was trying to use downsampling I add the data to a temporary series & then set it to the line by setting its datasource. I notice that the series is not displayed due to this.
Thanks
Hello gs,
Please, check that this code works fine in your application.
Thanks,
For this two questions please, could you send us a simple example project we can run "as-is" to reproduce the problem here? You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at ourupload page.1) I have a Teechart where in I draw Line chart. The user can configure the lines to be displayed using contextmenu selection. I made line visible or invisble by setting series.visible to true or false. This works fine.
There is a Grid in our application on change of selection of row i will clear the series & add new data to the series . The problem here is the scale of the chart does not change when new data is displayed . This problem wont happen when I use legend checkboxe to show & hide the lines instead of my contextmenu. Please let me know what really happens when we select unselect legend checkbox which is different then my doing it by setting series visible.
2) Axis label when its a big no say more than 5 digit number I am not able to see the complete number i just see 4 digits also the axis title is not displayed.
I recomend use next code for example:3) I was trying to use downsampling I add the data to a temporary series & then set it to the line by setting its datasource. I notice that the series is not displayed due to this.
Code: Select all
line1.CheckDataSource();
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 |
Our app uses real time data and when I do a checkdatasource after adding all points in the parent series, i see the number of points in the series getting reduced but i see the series containing zeroth element as the average of all values rest all values are zero. This is not what i expected
I was thinking that if there are 50 points in the series & i say tolerance of 10 , the 10 points should be reduced by a 1 or 2 point with average of 10 points & there should be 5 points in the series but i dont see that
Also can you tell me what the function calculate in downsampling does & how it works.
Thanks
I was thinking that if there are 50 points in the series & i say tolerance of 10 , the 10 points should be reduced by a 1 or 2 point with average of 10 points & there should be 5 points in the series but i dont see that
Also can you tell me what the function calculate in downsampling does & how it works.
Thanks
Tee chart Series Visibility and downsampling questions
In our app data is added realtime to the series. After adding data when I do checkdatasource i see the changed series has 0th elemnt as the average of all elements in the series & rest all elements are zeroes which i did not expected. I have set downsampling function as average.
I thought that if I have series with 50 points & set downsampling tolerance to 10. each set of 10 points will be replaced by average of those 10 elements & the new series will have 5 points. But i dont see this behavior. Can you pls explain whats the problem.
Also can you tell me what does the downsampling method calculate do.
Thanks,
Sachin
I thought that if I have series with 50 points & set downsampling tolerance to 10. each set of 10 points will be replaced by average of those 10 elements & the new series will have 5 points. But i dont see this behavior. Can you pls explain whats the problem.
Also can you tell me what does the downsampling method calculate do.
Thanks,
Sachin
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Sachin,
Could you please arrange a simple example project we can run "as-is" to reproduce the problem here?
You can create a dataset at runtime as Christoper Ireland's example here.
Files can be either posted at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Could you please arrange a simple example project we can run "as-is" to reproduce the problem here?
You can create a dataset at runtime as Christoper Ireland's example here.
Files can be either posted at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
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 |
downsampling issue
I have uploaded the example in desktop.zip. I have modified existing downsampling sample
private void btnAddPoints_Click(object sender, EventArgs e)
{
int count = int.Parse(txtDataPoints.Text);
points1.Clear();
points1.BeginUpdate();
System.Random r = new System.Random();
double tmp = r.NextDouble() * 10000;
DateTime d = new DateTime();
for (int t = 0; t < count; t++)
{
tmp += r.Next(100) - 49.5;
d = DateTime.Now;
d = d.AddMinutes(t);
points1.Add(d , tmp);
}
points1.EndUpdate();
downsampling1.Recalculate();
label1.Text = "Data points : " + points1.Count;
label4.Text = "Reduced data size :" + line1.Count;
}
on button click event I am adding the data to the series. instead of using int value for x axis I am using datetime. After running this code i see downsampling doesnt work properly the reduction of datapoints is less than the tolerance factor. Also just the zeroth point is having valid value rest all are zeroes.
Thanks,
Sachin
private void btnAddPoints_Click(object sender, EventArgs e)
{
int count = int.Parse(txtDataPoints.Text);
points1.Clear();
points1.BeginUpdate();
System.Random r = new System.Random();
double tmp = r.NextDouble() * 10000;
DateTime d = new DateTime();
for (int t = 0; t < count; t++)
{
tmp += r.Next(100) - 49.5;
d = DateTime.Now;
d = d.AddMinutes(t);
points1.Add(d , tmp);
}
points1.EndUpdate();
downsampling1.Recalculate();
label1.Text = "Data points : " + points1.Count;
label4.Text = "Reduced data size :" + line1.Count;
}
on button click event I am adding the data to the series. instead of using int value for x axis I am using datetime. After running this code i see downsampling doesnt work properly the reduction of datapoints is less than the tolerance factor. Also just the zeroth point is having valid value rest all are zeroes.
Thanks,
Sachin
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Sachin,
You need to combine Tolerance with DisplayedPointCount here, for example:
The DisplayedPointCount specifies how many points the DownSampling function should paint and displays this number as a maximum number of points.
Note that the DisplayedPointCount has to be multiplied by 4 when the Method is set to DownSamplingMethod.Average. This is because the number of points in the group of points used to calculate the function varies according to the different Methods set.
You need to combine Tolerance with DisplayedPointCount here, for example:
Code: Select all
private void btnAddPoints_Click(object sender, EventArgs e)
{
int count = int.Parse(txtDataPoints.Text);
points1.XValues.DateTime = true;
points1.Clear();
points1.BeginUpdate();
System.Random r = new System.Random();
double tmp = r.NextDouble() * 10000;
DateTime d = new DateTime();
for (int t = 0; t < count; t++)
{
tmp += r.Next(100) - 49.5;
d = DateTime.Now;
d = d.AddMinutes(t);
points1.Add(d , tmp);
}
points1.EndUpdate();
downsampling1.DisplayedPointCount = Convert.ToInt32(downsampling1.Tolerance * 4);
downsampling1.Recalculate();
label1.Text = "Data points : " + points1.Count;
label4.Text = "Reduced data size :" + line1.Count;
}
Note that the DisplayedPointCount has to be multiplied by 4 when the Method is set to DownSamplingMethod.Average. This is because the number of points in the group of points used to calculate the function varies according to the different Methods set.
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 |
downsampling issue
I dont see DisplayedPointCount in v2 . Is it available in new version. I there any other alternative way to do this
Thanks,
Sachin
Thanks,
Sachin
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Sachin,
DisplayedPointCount is a new property in v3. In v3 DownSampling function was enhanced and I'm afraid it may not work with DateTime values in v3.
DisplayedPointCount is a new property in v3. In v3 DownSampling function was enhanced and I'm afraid it may not work with DateTime values in v3.
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 |
downsampling issue
when the datetime issue planned to fix?
Thanks,
Sachin
Thanks,
Sachin
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Sachin,
Sorry, my fault. I meant it may not work in v2 but already works fine in v3.I'm afraid it may not work with DateTime values in v3.
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 |