protected double calculateBarW0(CategoryPlot plot,PlotOrientation orientation,Rectangle2D dataArea,CategoryAxis domainAxis,CategoryItemRendererState state,int row,int column){
  double space;
  if (orientation.isHorizontal()) {
    space=dataArea.getHeight();
  }
 else {
    space=dataArea.getWidth();
  }
  double barW0=domainAxis.getCategoryStart(column,getColumnCount(),dataArea,plot.getDomainAxisEdge());
  int seriesCount=state.getVisibleSeriesCount();
  if (seriesCount < 0) {
    seriesCount=getRowCount();
  }
  int categoryCount=getColumnCount();
  if (seriesCount > 1) {
    double seriesGap=space * getItemMargin() / (categoryCount * (seriesCount - 1));
    double seriesW=calculateSeriesWidth(space,domainAxis,categoryCount,seriesCount);
    barW0=barW0 + row * (seriesW + seriesGap) + (seriesW / 2.0) - (state.getBarWidth() / 2.0);
  }
 else {
    barW0=domainAxis.getCategoryMiddle(column,getColumnCount(),dataArea,plot.getDomainAxisEdge()) - state.getBarWidth() / 2.0;
  }
  return barW0;
}

protected double calculateBarW0 ( CategoryPlot plot , PlotOrientation orientation , Rectangle2D dataArea , CategoryAxis domainAxis , CategoryItemRendererState state , int row , int column ) { double space ; if ( orientation . isHorizontal ( ) ) { space = dataArea . getHeight ( ) ; } else { space = dataArea . getWidth ( ) ; } double barW0 = domainAxis . getCategoryStart ( column , getColumnCount ( ) , dataArea , plot . getDomainAxisEdge ( ) ) ; int seriesCount = state . getVisibleSeriesCount ( ) ; if ( seriesCount < 0 ) { seriesCount = getRowCount ( ) ; } int categoryCount = getColumnCount ( ) ; if ( seriesCount > 1 ) { double seriesGap = space * getItemMargin ( ) / ( categoryCount * ( seriesCount - 1 ) ) ; double seriesW = calculateSeriesWidth ( space , domainAxis , categoryCount , seriesCount ) ; barW0 = barW0 + row * ( seriesW + seriesGap ) + ( seriesW / 2.0 ) - ( state . getBarWidth ( ) / 2.0 ) ; } else { barW0 = domainAxis . getCategoryMiddle ( column , getColumnCount ( ) , dataArea , plot . getDomainAxisEdge ( ) ) - state . getBarWidth ( ) / 2.0 ; } return barW0 ; }
calculates the coordinate of the first " side " of a bar . this will be the minimum x - coordinate for a vertical bar , and the minimum y - coordinate for a horizontal bar .
