protected double calculateCategoryGapSize(int categoryCount,Rectangle2D 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 , Rectangle2D 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 .
