private void configureRangeAxis(CategoryPlot plot, String valueLabelSuffix, Font font) { NumberAxis3D numberAxis = new NumberAxis3D(); numberAxis.setUpperMargin(0.3); numberAxis.setTickLabelFont(font); numberAxis.setTickLabelPaint(OUTLINE_COLOR); String suffix = ""; if (valueLabelSuffix != null && !"".equals(valueLabelSuffix)) { suffix = new StringBuilder().append("'").append(valueLabelSuffix).append("'").toString(); } numberAxis.setNumberFormatOverride(new DecimalFormat("0" + suffix)); numberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); plot.setRangeAxis(numberAxis); } }
if (!isVisible()) { AxisState state = new AxisState(cursor); List ticks = refreshTicks(g2, state, dataArea, edge); state.setTicks(ticks); return state; Plot plot = getPlot(); if (plot instanceof CategoryPlot) { CategoryPlot cp = (CategoryPlot) plot; AxisState info = drawTickMarksAndLabels(g2, cursor, plotArea, adjustedDataArea, edge); info = drawLabel(getLabel(), g2, plotArea, dataArea, edge, info);
/** * Creates a new axis. */ public GValueAxis3D() { super(); this.axisForAutoLabels = new NumberAxis3D(null); this.axisForAutoLabels.setRange(0.0, 100.0); this.axisForAutoLabels.setStandardTickUnits( NumberAxis.createIntegerTickUnits()); this.labelAxisStart = 0.0; this.labelAxisEnd = 100.0; this.tickLabels = new java.util.ArrayList(); this.tickLabelPositions = new java.util.ArrayList(); setLowerMargin(0.0); setUpperMargin(0.0); // the data is normalised into the range 0.0 to 1.0, so the real axis // has the same range... setRange(0.0, 1.0); setTickLabelPaint(Color.gray); setTickLabelFont(new Font("Dialog", Font.PLAIN, 11)); }
ValueAxis valueAxis = new NumberAxis3D(valueAxisLabel);
double v0 = this.labelAxisStart + getLowerBound() * range; double v1 = this.labelAxisStart + getUpperBound() * range; this.axisForAutoLabels.setRange(Math.min(v0, v1), Math.max(v0, v1)); this.axisForAutoLabels.setInverted(inverted); List ticks = this.axisForAutoLabels.refreshTicks(g2, state, dataArea, edge); double v = tick.getValue(); double vv = (v - min) / (max - min); if (this.axisForAutoLabels.isInverted()) { vv = 1.0 - vv;
ValueAxis valueAxis = new NumberAxis3D(valueAxisLabel);
ValueAxis valueAxis = new NumberAxis3D(valueAxisLabel);
chartDefinition.isThreeD() ? new NumberAxis3D( domainAxisLabel ) : new NumberAxis( domainAxisLabel ); domainAxis.setAutoRangeIncludesZero( chartDefinition.isDomainIncludesZero() ); domainAxis.setAutoRangeStickyZero( chartDefinition.isDomainStickyZero() );
chartDefinition.isThreeD() ? new NumberAxis3D( domainAxisLabel ) : new NumberAxis( domainAxisLabel ); domainAxis.setAutoRangeIncludesZero( chartDefinition.isDomainIncludesZero() ); domainAxis.setAutoRangeStickyZero( chartDefinition.isDomainStickyZero() );