afreechart/src/main/java/org/afree/chart/renderer/category/BarRenderer3D.java
/**
     * Draws a grid line against the range axis.
     *
     * @param canvas  the graphics device.
     * @param plot  the plot.
     * @param axis  the value axis.
     * @param dataArea  the area for plotting data (not yet adjusted for any
     *                  3D effect).
     * @param value  the value at which the grid line should be drawn.
     *
     */
Draws a grid line against the range axis.
@param canvas  the graphics device.
@param plot  the plot.
@param axis  the value axis.
@param dataArea  the area for plotting data (not yet adjusted for any
3D effect).
@param value  the value at which the grid line should be drawn.
Draws a grid line against the range axis . @param canvas the graphics device . @param plot the plot . @param axis the value axis . @param dataArea the area for plotting data ( not yet adjusted for any 3D effect ) . @param value the value at which the grid line should be drawn .
public void drawRangeGridline(Canvas canvas, CategoryPlot plot,
            ValueAxis axis, RectShape dataArea, double value) {
        Range range = axis.getRange();
        if (!range.contains(value)) {
            return;
        }
        RectShape adjusted = new RectShape(dataArea.getX(),
                dataArea.getY() + getYOffset(), dataArea.getWidth()
                - getXOffset(), dataArea.getHeight() - getYOffset());
        LineShape line1 = null;
        LineShape line2 = null;
        PlotOrientation orientation = plot.getOrientation();
        if (orientation == PlotOrientation.HORIZONTAL) {
            double x0 = axis.valueToJava2D(value, adjusted,
                    plot.getRangeAxisEdge());
            double x1 = x0 + getXOffset();
            double y0 = dataArea.getMaxY();
            double y1 = y0 - getYOffset();
            double y2 = dataArea.getMinY();
            line1 = new LineShape(x0, y0, x1, y1);
            line2 = new LineShape(x1, y1, x1, y2);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            double y0 = axis.valueToJava2D(value, adjusted,
                    plot.getRangeAxisEdge());
            double y1 = y0 - getYOffset();
            double x0 = dataArea.getMinX();
            double x1 = x0 + getXOffset();
            double x2 = dataArea.getMaxX();
            line1 = new LineShape(x0, y0, x1, y1);
            line2 = new LineShape(x1, y1, x2, y1);
        }
        PaintType paintType = plot.getRangeGridlinePaintType();
        if ( paintType == null ) {
            paintType = Plot.DEFAULT_OUTLINE_PAINT_TYPE;
        }
        float stroke = plot.getRangeGridlineStroke();
        if ( plot.getRangeGridlineStroke() != 0.0f ) {
            Paint paint = PaintUtility.createPaint(
                    Paint.ANTI_ALIAS_FLAG, 
                    paintType, 
                    stroke, 
                    plot.getOutlineEffect());
            line1.draw(canvas, paint);
            line2.draw(canvas, paint);
        }
    }
public void drawRangeGridline ( Canvas canvas , CategoryPlot plot , ValueAxis axis , RectShape dataArea , double value ) { Range range = axis . getRange ( ) ; if ( ! range . contains ( value ) ) { return ; } RectShape adjusted = new RectShape ( dataArea . getX ( ) , dataArea . getY ( ) + getYOffset ( ) , dataArea . getWidth ( ) - getXOffset ( ) , dataArea . getHeight ( ) - getYOffset ( ) ) ; LineShape line1 = null ; LineShape line2 = null ; PlotOrientation orientation = plot . getOrientation ( ) ; if ( orientation == PlotOrientation . HORIZONTAL ) { double x0 = axis . valueToJava2D ( value , adjusted , plot . getRangeAxisEdge ( ) ) ; double x1 = x0 + getXOffset ( ) ; double y0 = dataArea . getMaxY ( ) ; double y1 = y0 - getYOffset ( ) ; double y2 = dataArea . getMinY ( ) ; line1 = new LineShape ( x0 , y0 , x1 , y1 ) ; line2 = new LineShape ( x1 , y1 , x1 , y2 ) ; } else if ( orientation == PlotOrientation . VERTICAL ) { double y0 = axis . valueToJava2D ( value , adjusted , plot . getRangeAxisEdge ( ) ) ; double y1 = y0 - getYOffset ( ) ; double x0 = dataArea . getMinX ( ) ; double x1 = x0 + getXOffset ( ) ; double x2 = dataArea . getMaxX ( ) ; line1 = new LineShape ( x0 , y0 , x1 , y1 ) ; line2 = new LineShape ( x1 , y1 , x2 , y1 ) ; } PaintType paintType = plot . getRangeGridlinePaintType ( ) ; if ( paintType == null ) { paintType = Plot . DEFAULT_OUTLINE_PAINT_TYPE ; } float stroke = plot . getRangeGridlineStroke ( ) ; if ( plot . getRangeGridlineStroke ( ) != 0.0f ) { Paint paint = PaintUtility . createPaint ( Paint . ANTI_ALIAS_FLAG , paintType , stroke , plot . getOutlineEffect ( ) ) ; line1 . draw ( canvas , paint ) ; line2 . draw ( canvas , paint ) ; } }
Draws a grid line against the range axis.
Draws a grid line against the range axis .