Hi, i have a chart displaying 1000 points and an X axis time formatted.
The problem is that when I have just few points (3 for example), the points arrive at the right to best fit the screen.
What I would like is to avoid that and have a fixed scale, and when 1000 points are drawn, the firsts go left. Is it possible to do that?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi, i have a chart displaying 1000 points and an X axis time formatted.
The problem is that when I have just few points (3 for example), the points arrive at the right to best fit the screen.
What I would like is to avoid that and have a fixed scale, and when 1000 points are drawn, the firsts go left. Is it possible to do that?
Thanks
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
nobody ? :p
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I can think of 2 options. However, I'm not that familiar with the library yet, so there may be better alternatives.
1) Use a different viewport policy, e.g.,
Range xRange = new Range(minX, maxX);
IRangePolicy policy = new RangePolicyFixedViewport(xRange);
chart.getAxisX().setRangePolicy(policy);
2) Initialize points as NaN and replace the ones you want to update
Last edit: Anonymous 2015-05-18
My bet: 1) works. Never tested 2). 1) adds complexity O(1) while 2) adds O(n) (where n is amount of points).