RectangleEdge location = plot.getRangeAxisEdge(); double yy1 = rangeAxis.valueToJava2D(y1, dataArea, location);
/** * Returns the edge where the primary range axis is located. * * @return The edge (never {@code null}). */ public RectangleEdge getRangeAxisEdge() { return getRangeAxisEdge(0); }
/** * Returns the edge where the primary range axis is located. * * @return The edge (never <code>null</code>). */ public RectangleEdge getRangeAxisEdge() { return getRangeAxisEdge(0); }
/** * Utility method for drawing a line perpendicular to the range axis (used * for crosshairs). * * @param g2 the graphics device. * @param dataArea the area defined by the axes. * @param value the data value. * @param stroke the line stroke ({@code null} not permitted). * @param paint the line paint ({@code null} not permitted). */ protected void drawRangeLine(Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint) { double java2D = getRangeAxis().valueToJava2D(value, dataArea, getRangeAxisEdge()); Line2D line = null; if (this.orientation == PlotOrientation.HORIZONTAL) { line = new Line2D.Double(java2D, dataArea.getMinY(), java2D, dataArea.getMaxY()); } else if (this.orientation == PlotOrientation.VERTICAL) { line = new Line2D.Double(dataArea.getMinX(), java2D, dataArea.getMaxX(), java2D); } g2.setStroke(stroke); g2.setPaint(paint); g2.draw(line); }
/** * Utility method for drawing a line perpendicular to the range axis (used * for crosshairs). * * @param g2 the graphics device. * @param dataArea the area defined by the axes. * @param value the data value. * @param stroke the line stroke (<code>null</code> not permitted). * @param paint the line paint (<code>null</code> not permitted). */ protected void drawRangeLine(Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint) { double java2D = getRangeAxis().valueToJava2D(value, dataArea, getRangeAxisEdge()); Line2D line = null; if (this.orientation == PlotOrientation.HORIZONTAL) { line = new Line2D.Double(java2D, dataArea.getMinY(), java2D, dataArea.getMaxY()); } else if (this.orientation == PlotOrientation.VERTICAL) { line = new Line2D.Double(dataArea.getMinX(), java2D, dataArea.getMaxX(), java2D); } g2.setStroke(stroke); g2.setPaint(paint); g2.draw(line); }
CategoryPlot plot = chart.getCategoryPlot(); ValueAxis axis = plot.getRangeAxis(); Rectangle2D area = chartPanel.getChartRenderingInfo().getPlotInfo().getPlotArea(); double yCoordinate = axis.valueToJava2D(12000, area, plot.getRangeAxisEdge());
double v = axis.valueToJava2D(value, dataArea, plot.getRangeAxisEdge()); if (orientation == PlotOrientation.HORIZONTAL) { line = new Line2D.Double(v, dataArea.getMinY(), v,
double v = axis.valueToJava2D(value, dataArea, plot.getRangeAxisEdge()); if (orientation == PlotOrientation.HORIZONTAL) { line = new Line2D.Double(v, dataArea.getMinY(), v,
double v = axis.valueToJava2D(value, dataArea, plot.getRangeAxisEdge()); Line2D line = null; if (orientation == PlotOrientation.HORIZONTAL) {
/** * Returns the edge for a range axis. * * @param index the axis index. * * @return The edge. */ public RectangleEdge getRangeAxisEdge(int index) { AxisLocation location = getRangeAxisLocation(index); RectangleEdge result = Plot.resolveRangeAxisLocation(location, this.orientation); if (result == null) { result = RectangleEdge.opposite(getRangeAxisEdge(0)); } return result; }
if (orientation == PlotOrientation.HORIZONTAL) { double x0 = axis.valueToJava2D(value, adjusted, plot.getRangeAxisEdge()); double x1 = x0 + getXOffset(); double y0 = dataArea.getMaxY(); plot.getRangeAxisEdge()); double y1 = y0 - getYOffset(); double x0 = dataArea.getMinX();
if (orientation == PlotOrientation.HORIZONTAL) { float x = (float) axis.valueToJava2D(value, adjusted, plot.getRangeAxisEdge()); float y = (float) adjusted.getMaxY(); path = new GeneralPath(); plot.getRangeAxisEdge()); float x = (float) dataArea.getX(); path = new GeneralPath();
if (orientation == PlotOrientation.HORIZONTAL) { double x0 = axis.valueToJava2D(value, adjusted, plot.getRangeAxisEdge()); double x1 = x0 + getXOffset(); double y0 = dataArea.getMaxY(); plot.getRangeAxisEdge()); double y1 = y0 - getYOffset(); double x0 = dataArea.getMinX();
if (orientation == PlotOrientation.HORIZONTAL) { double x0 = axis.valueToJava2D(value, adjusted, plot.getRangeAxisEdge()); double x1 = x0 + getXOffset(); double y0 = dataArea.getMaxY(); plot.getRangeAxisEdge()); double y1 = y0 - getYOffset(); double x0 = dataArea.getMinX();
info.getDataArea(), getRangeAxisEdge()); rangeAxis.resizeRange2(factor, anchorY); } else {
info.getDataArea(), getRangeAxisEdge()); rangeAxis.resizeRange2(factor, anchorY);
double value = n.doubleValue(); double y1 = rangeAxis.valueToJava2D(value, dataArea, plot.getRangeAxisEdge());
if (yAxis != null) { int i = findRangeAxisIndex(yAxis); RectangleEdge edge = getRangeAxisEdge(i); space = yAxis.reserveSpace(g2, this, plotArea, edge, space);
double barW0 = calculateBarW0(plot, orientation, dataArea, domainAxis, state, visibleRow, column); RectangleEdge edge = plot.getRangeAxisEdge(); double barL = rangeAxis.valueToJava2D(value, dataArea, edge);
Axis yAxis = (Axis) this.rangeAxes.get(i); if (yAxis != null) { RectangleEdge edge = getRangeAxisEdge(i); space = yAxis.reserveSpace(g2, this, plotArea, edge, space);