/** * Sets the tick label font. * * @param font the font. */ public void setTickLabelFont(Font font) { ValueAxis axis = this.plot.getRangeAxis(); axis.setTickLabelFont(font); }
CategoryPlot plot = chart.getCategoryPlot(); CategoryAxis axis = plot.getDomainAxis(); CategoryPlot p = chart.getCategoryPlot(); ValueAxis axis2 = p.getRangeAxis(); Font font = new Font("Dialog", Font.PLAIN, 25); axis.setTickLabelFont(font); Font font2 = new Font("Dialog", Font.PLAIN, 15); axis2.setTickLabelFont(font2); Font font3 = new Font("Dialog", Font.PLAIN, 25); plot.getDomainAxis().setLabelFont(font3); plot.getRangeAxis().setLabelFont(font3);
private void configureDomainAxis(XYPlot plot) { ValueAxis domainAxis = plot.getDomainAxis(); domainAxis.setTickLabelFont(LabelConstants.FONT_LABEL); domainAxis.setLabelFont(LabelConstants.FONT_LABEL); domainAxis.setTickLabelPaint(LabelConstants.COLOR); domainAxis.setLabelPaint(LabelConstants.COLOR); }
private void configureDomainAxis(XYPlot xyPlot) { ValueAxis domainAxis = xyPlot.getDomainAxis(); domainAxis.setTickLabelFont(FONT_LABEL); domainAxis.setLabelFont(FONT_LABEL); domainAxis.setTickLabelPaint(COLOR); domainAxis.setLabelPaint(COLOR); }
Font bigger = new Font(font.getName(), font.getStyle(), size); ValueAxis valueAxis = plot.getDomainAxis(); valueAxis.setTickLabelFont(bigger); bigger = new Font(font.getName(), font.getStyle(), size); valueAxis = plot.getRangeAxis(); valueAxis.setTickLabelFont(bigger);
Font bigger = new Font(font.getName(), font.getStyle(), size); ValueAxis valueAxis = plot.getDomainAxis(); valueAxis.setTickLabelFont(bigger); bigger = new Font(font.getName(), font.getStyle(), size); valueAxis = plot.getRangeAxis(); valueAxis.setTickLabelFont(bigger);
plot.getRangeAxis().setTickLabelFont(SMALL_FONT); plot.getDomainAxis().setLabelFont(FONT); plot.getDomainAxis().setTickLabelFont(SMALL_FONT);
plot.getRangeAxis().setTickLabelFont(SMALL_FONT); plot.getDomainAxis().setLabelFont(FONT); plot.getDomainAxis().setTickLabelFont(SMALL_FONT);
/** * Applies the attributes for this theme to a {@link ValueAxis}. * * @param axis the axis (<code>null</code> not permitted). */ protected void applyToValueAxis(ValueAxis axis) { axis.setLabelFont(this.largeFont); axis.setLabelPaint(this.axisLabelPaint); axis.setTickLabelFont(this.regularFont); axis.setTickLabelPaint(this.tickLabelPaint); if (axis instanceof SymbolAxis) { applyToSymbolAxis((SymbolAxis) axis); } if (axis instanceof PeriodAxis) { applyToPeriodAxis((PeriodAxis) axis); } }
/** * Applies the attributes for this theme to a {@link ValueAxis}. * * @param axis the axis ({@code null} not permitted). */ protected void applyToValueAxis(ValueAxis axis) { axis.setLabelFont(this.largeFont); axis.setLabelPaint(this.axisLabelPaint); axis.setTickLabelFont(this.regularFont); axis.setTickLabelPaint(this.tickLabelPaint); if (axis instanceof SymbolAxis) { applyToSymbolAxis((SymbolAxis) axis); } if (axis instanceof PeriodAxis) { applyToPeriodAxis((PeriodAxis) axis); } }
domainAxis.setTickLabelFont(domainAxisTickLabelFont.deriveFont(domainAxisTickLabelFontSize * 0.6f)); rangeAxis.setTickLabelFont(rangeAxisTickLabelFont.deriveFont(rangeAxisTickLabelFontSize * 0.6f));
axisDomain.setTickLabelFont(font1); ValueAxis axisRange = plot.getRangeAxis(); axisRange.setTickLabelFont(font2); chart.setAntiAlias(true); f.add(new ChartPanel(chart){
plot.getRangeAxis().setTickLabelFont(SMALL_FONT); plot.getDomainAxis().setLabelFont(FONT); plot.getDomainAxis().setTickLabelFont(SMALL_FONT);
plot.getRangeAxis().setTickLabelFont(SMALL_FONT); plot.getDomainAxis().setLabelFont(FONT); plot.getDomainAxis().setTickLabelFont(SMALL_FONT);
graph.getXYPlot().getDomainAxis().setTickLabelFont(new Font("SansSerif", Font.PLAIN, 20)); graph.getXYPlot().getRangeAxis().setTickLabelFont(new Font("SansSerif", Font.PLAIN, 20)); graph.getXYPlot().getDomainAxis().setLabelFont(new Font("SansSerif", Font.BOLD, 22)); graph.getXYPlot().getRangeAxis().setLabelFont(new Font("SansSerif", Font.BOLD, 22));
plot.setRenderer( 0, pointRenderer ); plot.getRangeAxis().setLabelFont( FONT ); plot.getRangeAxis().setTickLabelFont( SMALL_FONT ); plot.getDomainAxis().setLabelFont( FONT ); plot.getDomainAxis().setTickLabelFont( SMALL_FONT );
plot.setRenderer( 0, pointRenderer ); plot.getRangeAxis().setLabelFont( FONT ); plot.getRangeAxis().setTickLabelFont( SMALL_FONT ); plot.getDomainAxis().setLabelFont( FONT ); plot.getDomainAxis().setTickLabelFont( SMALL_FONT );
plot.setRenderer( 0, pointRenderer ); plot.getRangeAxis().setLabelFont( FONT ); plot.getRangeAxis().setTickLabelFont( SMALL_FONT ); plot.getDomainAxis().setLabelFont( FONT ); plot.getDomainAxis().setTickLabelFont( SMALL_FONT );
static ValueAxis updateScalingOfAxis(boolean logScaled, ValueAxis oldAxis, final boolean autoRangeIncludesZero) { ValueAxis newAxis = oldAxis; if (logScaled) { if (!(oldAxis instanceof CustomLogarithmicAxis)) { final CustomLogarithmicAxis logarithmicAxis = createLogarithmicAxis(oldAxis.getLabel()); logarithmicAxis.setAutoRange(oldAxis.isAutoRange()); newAxis = logarithmicAxis; } } else { if (oldAxis instanceof CustomLogarithmicAxis) { final NumberAxis numberAxis = createNumberAxis(oldAxis.getLabel(), autoRangeIncludesZero); numberAxis.setAutoRange(oldAxis.isAutoRange()); newAxis = numberAxis; } } newAxis.setLabelFont(oldAxis.getLabelFont()); newAxis.setLabelPaint(oldAxis.getLabelPaint()); newAxis.setTickLabelFont(oldAxis.getTickLabelFont()); newAxis.setTickLabelPaint(oldAxis.getTickLabelPaint()); return newAxis; }
static ValueAxis updateScalingOfAxis(boolean logScaled, ValueAxis oldAxis, final boolean autoRangeIncludesZero) { ValueAxis newAxis = oldAxis; if (logScaled) { if (!(oldAxis instanceof CustomLogarithmicAxis)) { final CustomLogarithmicAxis logarithmicAxis = createLogarithmicAxis(oldAxis.getLabel()); logarithmicAxis.setAutoRange(oldAxis.isAutoRange()); newAxis = logarithmicAxis; } } else { if (oldAxis instanceof CustomLogarithmicAxis) { final NumberAxis numberAxis = createNumberAxis(oldAxis.getLabel(), autoRangeIncludesZero); numberAxis.setAutoRange(oldAxis.isAutoRange()); newAxis = numberAxis; } } newAxis.setLabelFont(oldAxis.getLabelFont()); newAxis.setLabelPaint(oldAxis.getLabelPaint()); newAxis.setTickLabelFont(oldAxis.getTickLabelFont()); newAxis.setTickLabelPaint(oldAxis.getTickLabelPaint()); return newAxis; }