protected void drawBars(Graphics2D g) {
    if (!isValuesFilled()) {
      return;
    }

    double barStep = (getWidth() - (leftChartMargin + FIRST_BAR_LEFT_MARGIN)* 2) / getValues().length;
    double xTopLabel;
    double xBottomLabel;
    int x;
    int y;
    int w;
    int h;
    Value value;
    double realBarWidth;
    for (int i = 0; i < getValues().length; i++) {
      //bar
      if (useDifferentColors) {
        g.setColor(getColor(i));
      } else {
        g.setColor(barsColor);
      }
      value = getValues()[i];
      xTopLabel = leftChartMargin + barStep * i + FIRST_BAR_LEFT_MARGIN;
      xBottomLabel = xTopLabel;
      realBarWidth = (barWidth + barStep) / 2;
      x = round(xTopLabel);
      y = round(getPointTop(value.getValue()));
      w = round(realBarWidth);
      h = round(getBarHeight(value.getValue()));
      g.fillRect(x, y, w, h);

      //bar border
      if (value.getValue() > 0) {
        g.setColor(gridColor);
        g.drawRect(x, y, w, h);
      }

      //top bar label
      if (showPointsLabels && value.getValue() > 0) {
        xTopLabel = xTopLabel + getCenterX(realBarWidth, value.getValue(), g);
        x = round(xTopLabel);
        y = round(getPointTop(value.getValue()) + TOP_BAR_LABEL_TOP_MARGIN);
        g.setColor(TOP_BAR_LABEL_COLOR);
        g.drawString(format(value.getValue()), x, y);
      }

      //bottom bar label
      if (isLabelsColorLikeBars) {
        g.setColor(getColor(i));
      } else {
        g.setColor(labelsColor);
      }
      xBottomLabel = xBottomLabel + getCenterX(realBarWidth, value.getLabel(), g);
      x = round(xBottomLabel);
      y = round(getHeight() - getCenterPoint(chartMargin, getStringHeight(value.getLabel(), g)));
      g.drawString(value.getLabel(), x, y);
    }
  }