Vertical bar chart starting from -1
Vertical bar chart starting from -1
I am trying to generate a vertical bar chart. I want the vertical bar starts from -1 instead of 0. I tried several ways, including change the static value ZERO in Plot class from 0 to -1, but can not make it work. Can someone give me help on this?
RE: Vertical bar chart starting from -1
Hi,
setMinimumAxisValue(java.lang.Number value) is a method in NumberAxis which is inherited by VerticalNumberAxis so you might try:-
((VerticalNumberAxis) plot.getVerticalAxis()).setMinimumAxisValue(new Integer(-1));
// followed by
((VerticalNumberAxis) plot.getVerticalAxis()).autoAdjustRange();
// to make sure it happens
Angela
setMinimumAxisValue(java.lang.Number value) is a method in NumberAxis which is inherited by VerticalNumberAxis so you might try:-
((VerticalNumberAxis) plot.getVerticalAxis()).setMinimumAxisValue(new Integer(-1));
// followed by
((VerticalNumberAxis) plot.getVerticalAxis()).autoAdjustRange();
// to make sure it happens
Angela