question: public void drawBarsOnGraph ( Graphics2D g2d , ArrayList < ComparableLabel > orderedDateSet , HashMap < ComparableLabel , Integer [ ] > barDataPoints , long yMaxMark ) { int sectionWidth = this . graphWidth / orderedDateSet . size ( ) ; int xOffset = sectionWidth / 2 ; int yValue ; float yOffsetPerc ; int numberOfBars = barDataPoints . get ( orderedDateSet . get ( 0 ) ) . length ; int barWidth = sectionWidth / ( numberOfBars + 1 ) ; for ( int datePos = 0 ; datePos < orderedDateSet . size ( ) ; datePos ++ ) { for ( int barNumber = 0 ; barNumber < numberOfBars ; barNumber ++ ) { yValue = barDataPoints . get ( orderedDateSet . get ( datePos ) ) [ barNumber ] ; yOffsetPerc = yValue / ( float ) yMaxMark ; int xLeftBar = this . graphLeft + datePos * sectionWidth + barWidth / 2 + barWidth * barNumber ; drawBar ( g2d , Math . round ( this . graphHeight * yOffsetPerc ) , barWidth , xLeftBar , this . graphBottom , this . barColors [ barNumber ] ) ; if ( Math . round ( this . graphHeight * yOffsetPerc ) == 0 && yValue != 0 ) { g2d . setColor ( this . barColors [ barNumber ] ) ; g2d . drawLine ( xLeftBar , this . graphBottom , xLeftBar + barWidth , this . graphBottom ) ; } } } }
target:  draws the first and second set of bars on the bar graph