/** * Constructs a number axis, using default values where necessary. * * @param label the axis label ({@code null} permitted). */ public NumberAxis(String label) { super(label, NumberAxis.createStandardTickUnits()); this.rangeType = RangeType.FULL; this.autoRangeIncludesZero = DEFAULT_AUTO_RANGE_INCLUDES_ZERO; this.autoRangeStickyZero = DEFAULT_AUTO_RANGE_STICKY_ZERO; this.tickUnit = DEFAULT_TICK_UNIT; this.numberFormatOverride = null; this.markerBand = null; }
/** * Constructs a number axis, using default values where necessary. * * @param label the axis label (<code>null</code> permitted). */ public NumberAxis(String label) { super(label, NumberAxis.createStandardTickUnits()); this.rangeType = RangeType.FULL; this.autoRangeIncludesZero = DEFAULT_AUTO_RANGE_INCLUDES_ZERO; this.autoRangeStickyZero = DEFAULT_AUTO_RANGE_STICKY_ZERO; this.tickUnit = DEFAULT_TICK_UNIT; this.numberFormatOverride = null; this.markerBand = null; }
public void createGcChart( HistoricSamples samples, String dataId ) throws IOException { XYPlot xyplot1 = newPlot( samples.getGcRatio( dataId ), "chronos.label.gc.ratio", true ); xyplot1.setRangeAxisLocation( AxisLocation.BOTTOM_OR_LEFT ); xyplot1.getRenderer().setSeriesPaint( 0, Color.GREEN ); xyplot1.getRangeAxis().setStandardTickUnits( NumberAxis.createStandardTickUnits() ); XYPlot xyplot2 = newPlot( samples.getKbCollectedPrSecond( dataId ), "chronos.label.gc.kbpersec", true ); xyplot2.setRangeAxisLocation( AxisLocation.TOP_OR_LEFT ); xyplot2.getRenderer().setSeriesPaint( 0, Color.GRAY ); xyplot2.getRangeAxis().setStandardTickUnits( NumberAxis.createStandardTickUnits() ); String timeLabel = bundle.getString( "chronos.label.gc.historytime" ); DateAxis timeAxis = ChartUtil.createTimeAxis( timeLabel, new SimpleDateFormat() ); XYPlot combinedPlot = ChartUtil.createCombinedPlot( timeAxis, xyplot1, xyplot2 ); // xyplot1.setDomainAxis( timeAxis ); // XYPlot combinedPlot = xyplot1; JFreeChart chart = new JFreeChart( bundle.getString( "chronos.label.gc" ), combinedPlot ); renderer.renderChart( "history-gc-" + dataId, chart ); }
rangeAxis.setStandardTickUnits(NumberAxis.createStandardTickUnits()); rangeAxis.setTickLabelFont(jFromLabel.getFont());