// Now translate the current y values.
double yy0 = rangeAxis.valueToJava2D(y0, dataArea, location);
if (pass == 0) {
// left half
Polygon p = new Polygon();
p.addPoint((int) xx0, (int) yy0);
p.addPoint((int) (xx0+xx1)/2, (int) (yy0+yy1)/2);
p.addPoint((int) (xx0+xx1)/2, (int) (previousHeightxx0+previousHeightxx1)/2);
p.addPoint((int) xx0, (int) previousHeightxx0);
g2.setPaint(getItemPaint(row, column-1));
g2.setStroke(getItemStroke(row, column-1));
g2.fill(p);
if (entities != null)
addItemEntity(entities, dataset, row, column-1, p);
// right half
p = new Polygon();
p.addPoint((int) xx1, (int) yy1);
p.addPoint((int) (xx0+xx1)/2, (int) (yy0+yy1)/2);
p.addPoint((int) (xx0+xx1)/2, (int) (previousHeightxx0+previousHeightxx1)/2);
p.addPoint((int) xx1, (int) previousHeightxx1);
g2.setPaint(getItemPaint(row, column));
g2.setStroke(getItemStroke(row, column));
g2.fill(p);