TimesSeries: domain axis start point
-
- Posts: 7
- Joined: Wed Aug 15, 2007 9:26 pm
TimesSeries: domain axis start point
From the example dynamic demo1 it looks like the data is plotted from right to left. Is there any way to get the starting plot point to be at Y axis(0). In other wards, start from left side of graph and continue growing to the right and vice versa. Thanks.
-
- Posts: 844
- Joined: Fri Oct 13, 2006 9:29 pm
- Location: Sunnyvale, CA
Re: TimesSeries: domain axis start point
I believe this is just a combination effect of the axis range, axis margins, and when the user presses the button to create a point. The easiest way I can think of creating this behavior is setting the minimum bound of the axis to be the time the user first hits the button and set the maximum bound to be some point in the future. As more datapoints are added, the range will grow bigger and the axis will automatically scale to fit. This is all back of the envelope thinking, so I have not tried it out with real code.determen77 wrote:From the example dynamic demo1 it looks like the data is plotted from right to left. Is there any way to get the starting plot point to be at Y axis(0). In other wards, start from left side of graph and continue growing to the right and vice versa.
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: TimesSeries: domain axis start point
Do you mean start with a fixed axis range, plot from the left to the right, then begin scrolling when the data reaches the right-side of the chart? We need to support that, but right now we don't. It can probably be fixed with some additional code in the autoAdjustRange() method, and a flag to specify how the fixedAutoRange 'window' should be aligned when there is less data than required to fill the window.determen77 wrote:Is there any way to get the starting plot point to be at Y axis(0). In other wards, start from left side of graph and continue growing to the right and vice versa. Thanks.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 7
- Joined: Wed Aug 15, 2007 9:26 pm
I said Y(0) axis because when dealing with time on X -axis the definitive 0 would be midnight. In this case it's total alignment. I currently have scroll bars that are tied to the domain and range models. When I dynamically use
TimeSeries (use 'Timer' to generate data) the scrollbar tied to the domain axis becomes unusable(if try to move, it generates this exception(
Requires 'lower' < 'upper'.
at org.jfree.chart.axis.DateAxis.setRange(DateAxis.java:538)).
Being new at this I'm not too sure how to resolve this. When dealing with static data it's very easy because the datasets are always defined.
For scrolling the Y axis, there doesn't seem to be any problems.
For scrolling the X axis, there may be a translation problem between the domain model and horizontal scroll bar.
So my first problem is the positioning of the first segment(or series) and ONLY scrolling when going off chart(should be backward scrollable too).
Second problem is the breakdown of scrolling behavior when using TimeSeries(DateAxis).
If there are areas in JFreeChart source that you know are lacking, but could be improved to support this new behavior, then by all means point me exactly to the source. I need to have this behavior. Thanks.
TimeSeries (use 'Timer' to generate data) the scrollbar tied to the domain axis becomes unusable(if try to move, it generates this exception(
Requires 'lower' < 'upper'.
at org.jfree.chart.axis.DateAxis.setRange(DateAxis.java:538)).
Being new at this I'm not too sure how to resolve this. When dealing with static data it's very easy because the datasets are always defined.
For scrolling the Y axis, there doesn't seem to be any problems.
For scrolling the X axis, there may be a translation problem between the domain model and horizontal scroll bar.
So my first problem is the positioning of the first segment(or series) and ONLY scrolling when going off chart(should be backward scrollable too).
Second problem is the breakdown of scrolling behavior when using TimeSeries(DateAxis).
If there are areas in JFreeChart source that you know are lacking, but could be improved to support this new behavior, then by all means point me exactly to the source. I need to have this behavior. Thanks.