afreechart/src/main/java/org/afree/chart/axis/CategoryAxis.java
/**
     * Calculates the size (width or height, depending on the location of the
     * axis) of a category gap.
     * 
     * @param categoryCount
     *            the number of categories.
     * @param area
     *            the area within which the categories will be drawn.
     * @param edge
     *            the axis location.
     * 
     * @return The category gap width.
     */
Calculates the size (width or height, depending on the location of the
axis) of a category gap.

@param categoryCount
the number of categories.
@param area
the area within which the categories will be drawn.
@param edge
the axis location.

@return The category gap width.
Calculates the size ( width or height depending on the location of the axis ) of a category gap . @param categoryCount the number of categories . @param area the area within which the categories will be drawn . @param edge the axis location . @return The category gap width .
protected double calculateCategoryGapSize(int categoryCount,
            RectShape area, RectangleEdge edge) {
        double result = 0.0;
        double available = 0.0;
        if ((edge == RectangleEdge.TOP) || (edge == RectangleEdge.BOTTOM)) {
            available = area.getWidth();
        } else if ((edge == RectangleEdge.LEFT)
                || (edge == RectangleEdge.RIGHT)) {
            available = area.getHeight();
        }
        if (categoryCount > 1) {
            result = available * getCategoryMargin() / (categoryCount - 1);
        }
        return result;
    }
protected double calculateCategoryGapSize ( int categoryCount , RectShape area , RectangleEdge edge ) { double result = 0.0 ; double available = 0.0 ; if ( ( edge == RectangleEdge . TOP ) || ( edge == RectangleEdge . BOTTOM ) ) { available = area . getWidth ( ) ; } else if ( ( edge == RectangleEdge . LEFT ) || ( edge == RectangleEdge . RIGHT ) ) { available = area . getHeight ( ) ; } if ( categoryCount > 1 ) { result = available * getCategoryMargin ( ) / ( categoryCount - 1 ) ; } return result ; }
Calculates the size (width or height, depending on the location of the
 axis) of a category gap.
Calculates the size ( width or height depending on the location of the axis ) of a category gap .