Demos and Usage of org.jfree.chart.axis.NumberAxis.setNumberFormatOverride(NumberFormat formatter)


   1: import org.jfree.chart.axis.DateAxis;
   2: import org.jfree.chart.axis.NumberAxis;
   3: import org.jfree.chart.axis.NumberTickUnit;
   4:         ...
   5:     private void setYAxisFormat(XYPlot plot) {
   6:         NumberAxis yAxis = (NumberAxis) plot.getVerticalAxis();
   7:         NumberFormat yAxisFormat = new TimeNumberFormat();
   8:         ...
   9:         yAxis.setNumberFormatOverride(yAxisFormat);
  10:         yAxis.setMinimumAxisValue(0);

View Full Code Here
   1: import org.jfree.chart.JFreeChart;
   2: import org.jfree.chart.axis.NumberAxis;
   3: import org.jfree.chart.labels.StandardXYItemLabelGenerator;
   4:         ...
   5:         XYPlot plot = chart.getXYPlot();
   6:         NumberAxis rangeAxis1 = (NumberAxis) plot.getRangeAxis();
   7:         DecimalFormat format = new DecimalFormat("00.00");
   8:         ...
   9:         rangeAxis1.setNumberFormatOverride(format);

View Full Code Here