OK martin thx for your support, my solution for the moment is to change only the format
Code: Select all
NumberAxis axis = (NumberAxis)chart.getXYPlot().getRangeAxis();
axis.setNumberFormatOverride(new DecimalFormat("0.###"));
this will put the plot in the middle with the correct value
So if I have a value of 0
- than I have to lines above and 2 lines below the plot, the upper labelled with 0 and the lower with -0
If I have a value of 78
- than I have to lines above and 2 lines below the plot, the upper labelled with 78 and the lower also
thats not so beautiful (nice) but its OK, I was expecting this behaviour as I created the topic ^^
The best solution would be
- if I have only 1 value that the value is on the top (and complete visible)
- if I have 2 or more different values the higher value should be on the top and the lower on the bottom
regarding
axisY.setFixedAutoRange(1);
I played around with it
if I start with a value of 445 at the beginning, the value will be displayed on the top, the lower value is 444
if the value decreases to 421 the plot is not visible any more
If you change the fixed-auto-range of the y-axis this should not effect the width of the plot (or the x-axis, i.e. the date) in any way. I'm not sure what you mean by "only the half width of the plot is visible".
I mean, if the Plot is set to a width of 2 Pixel, only 1 Pixel of the 2 Pixel line is visible (if the plot is on the top)
Here a screenshot
http://img5.fotos-hochladen.net/uploads ... zd3jqc.png
How ever I dont want to bother you with my stupid problem