Ok this is very hard to explain, but unfortunately even harder to create a running demo-program of:
The strange behavior occur when I create a scatter plot where the values are added arbitrary on the x-axis, i.e. the last number added is usually NOT the one rightmost on the x-axis. Now, this is fine until I drag/pan the whole plot to the right, and to the moment where the final point of the series moves out of sight on the right hand side. Then, all remaining points in my plot disappear
Thing is, when I wrote a small program to reproduce it, nothing of this sort happened. But, I changed the input data in my full program, to check if it was due to the data; by just settinng Y-vals = i and X-values = i, except when i=xMax, then I add the point at x = xMax/2 (or wherever). In this case, as before, all remaining points diseappear when the final added point (meaning the one put at x=xMax/2) is dragged out of sight to the right.
My conclusion from this is that I am totally lost... Since I cant reproduce it when wanted, I know that it would seem that the fault is in my program. However, since the error occurs just when plotting simple demodata, I not 100% certain. It would be odd if this point-disappearing was caused by my program, since it happens after the plot is populated and just left alone for me to zoom and pan in ?
The mystery also occurs when I zoom in, and the last added point is on the Right side of the zoom-area. No problem encountered when panning the other way, or zooming in so the final added point is to the Left of the zoom-box.
I have been puzzled by this for some months now, and I hope that maybe someone here has experienced this before, or can think of what could be wrong. It would seem like some functionality for not calculating/plotting points that is assumed to be outside the viewport is activated when actually there still are points in the view...?
The closest thing I can come to demonstrate for you is to create a small video and send it I am afraid
So, anyone ever seen this behavior before?
Thanks a mill in advance, one more mill is proclaimed on delivery
Marius
Disappearing points when dragging chart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Marius,
It is very difficult for us being able to see where the problem is without being able to reproduce it . Problem doesn't occur here using code below. Could you please check your problematic application for any relevant code we can add to the example below to reproduce the problem here?
Thanks in advance.
It is very difficult for us being able to see where the problem is without being able to reproduce it . Problem doesn't occur here using code below. Could you please check your problematic application for any relevant code we can add to the example below to reproduce the problem here?
Code: Select all
tChart.removeAllSeries();
tChart.getTools().clear();
com.steema.teechart.styles.Points points1 = new com.steema.teechart.styles.Points(tChart.getChart());
points1.getXValues().setOrder(ValueListOrder.NONE);
//points1.getMarks().setVisible(true);
points1.setColorEach(true);
Random x = new Random();
Random y = new Random();
int maxPoints = 50;
for (int i=0; i<=maxPoints; i++)
{
if (i<maxPoints)
{
points1.add(x.nextDouble(), y.nextDouble(), String.valueOf(i), Color.BLUE);
}
else
{
points1.add(x.nextDouble(), y.nextDouble(), String.valueOf(i), Color.RED);
}
}
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 |
Code: Select all
points1.getXValues().setOrder(ValueListOrder.NONE);
Merry Easter
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Marius,
You're welcome, I'm glad to hear that helped.
You're welcome, I'm glad to hear that helped.
Thank you very much. Have a good one too!Merry Easter
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 |