Hello ,
Is it possible to chage the bar-chart scale to whole numbers fixed as i have seen the dynamic behaviour of the vertical scale .Some times these values are automatically converted into decimal numbers and make no sence like "no of days" in fractoin 6.7 days .
I also want to know that if there is any method which can inserts some gap between the vertical able of the bar-chart and the scale .
Thanks in advance.
Awais Bajwa
Regards
Changing Bar Chart scale to whole numbers
Re: Changing Bar Chart scale to whole numbers
Hi Awais,
You can set the auto-tick-unit-selection mechanism to use integer only labels:
NumberAxis rangeAxis = (NumberAxis) myPlot.getRangeAxis();
rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
The setLabelInsets(...) method in the Axis class can be used to increase the spacing around the axis label.
Regards,
DG
You can set the auto-tick-unit-selection mechanism to use integer only labels:
NumberAxis rangeAxis = (NumberAxis) myPlot.getRangeAxis();
rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
The setLabelInsets(...) method in the Axis class can be used to increase the spacing around the axis label.
Regards,
DG