afreechart/src/main/java/org/afree/chart/renderer/category/AbstractCategoryItemRenderer.java
/**
     * Draws a grid line against the domain axis.
     * <P>
     * Note that this default implementation assumes that the horizontal axis is
     * the domain axis. If this is not the case, you will need to override this
     * method.
     * 
     * @param canvas
     *            the graphics device.
     * @param plot
     *            the plot.
     * @param dataArea
     *            the area for plotting data (not yet adjusted for any 3D
     *            effect).
     * @param value
     *            the Java2D value at which the grid line should be drawn.
     * 
     * @see #drawRangeGridline(Canvas, CategoryPlot, ValueAxis, RectShape,
     *      double)
     */
Draws a grid line against the domain axis.

Note that this default implementation assumes that the horizontal axis is
the domain axis. If this is not the case, you will need to override this
method.

@param canvas
the graphics device.
@param plot
the plot.
@param dataArea
the area for plotting data (not yet adjusted for any 3D
effect).
@param value
the Java2D value at which the grid line should be drawn.


Draws a grid line against the domain axis . Note that this default implementation assumes that the horizontal axis is the domain axis . If this is not the case you will need to override this method . @param canvas the graphics device . @param plot the plot . @param dataArea the area for plotting data ( not yet adjusted for any 3D effect ) . @param value the Java2D value at which the grid line should be drawn .
public void drawDomainGridline(Canvas canvas, CategoryPlot plot,
            RectShape dataArea, double value) {
        LineShape line = null;
        PlotOrientation orientation = plot.getOrientation();
        if (orientation == PlotOrientation.HORIZONTAL) {
            line = new LineShape(dataArea.getMinX(), value, dataArea
                    .getMaxX(), value);
        } else if (orientation == PlotOrientation.VERTICAL) {
            line = new LineShape(value, dataArea.getMinY(), value, dataArea
                    .getMaxY());
        }
        PaintType paintType = plot.getDomainGridlinePaintType();
        if (paintType == null) {
            paintType = CategoryPlot.DEFAULT_GRIDLINE_PAINT_TYPE;
        }
        float stroke = plot.getDomainGridlineStroke();
        if (stroke == 0.0f) {
            stroke = CategoryPlot.DEFAULT_GRIDLINE_STROKE;
        }
        Paint paint = PaintUtility.createPaint(
                paintType,
                stroke,
                plot.getDomainGridlineEffect());
        paint.setStrokeCap(Paint.Cap.ROUND);
        line.draw(canvas, paint);
    }
public void drawDomainGridline ( Canvas canvas , CategoryPlot plot , RectShape dataArea , double value ) { LineShape line = null ; PlotOrientation orientation = plot . getOrientation ( ) ; if ( orientation == PlotOrientation . HORIZONTAL ) { line = new LineShape ( dataArea . getMinX ( ) , value , dataArea . getMaxX ( ) , value ) ; } else if ( orientation == PlotOrientation . VERTICAL ) { line = new LineShape ( value , dataArea . getMinY ( ) , value , dataArea . getMaxY ( ) ) ; } PaintType paintType = plot . getDomainGridlinePaintType ( ) ; if ( paintType == null ) { paintType = CategoryPlot . DEFAULT_GRIDLINE_PAINT_TYPE ; } float stroke = plot . getDomainGridlineStroke ( ) ; if ( stroke == 0.0f ) { stroke = CategoryPlot . DEFAULT_GRIDLINE_STROKE ; } Paint paint = PaintUtility . createPaint ( paintType , stroke , plot . getDomainGridlineEffect ( ) ) ; paint . setStrokeCap ( Paint . Cap . ROUND ) ; line . draw ( canvas , paint ) ; }
Draws a grid line against the domain axis.
Draws a grid line against the domain axis .