--- WCartesianChart.C.orig 2014-03-04 09:10:24.000000000 +0100 +++ WCartesianChart.C 2014-11-27 16:09:43.413509700 +0100 @@ -347,17 +347,25 @@ double left = topMid.x() - groupWidth_ / 2 + group_ * width * (1 + chart_.barMargin()); + bool nonZeroWidth = crisp(left) != crisp(left + width); + bar.moveTo(hv(crisp(left), crisp(topMid.y()))); - bar.lineTo(hv(crisp(left + width), crisp(topMid.y()))); - bar.lineTo(hv(crisp(left + width), crisp(bottomMid.y()))); + if ( nonZeroWidth ) { + bar.lineTo(hv(crisp(left + width), crisp(topMid.y()))); + bar.lineTo(hv(crisp(left + width), crisp(bottomMid.y()))); + } bar.lineTo(hv(crisp(left), crisp(bottomMid.y()))); - bar.closeSubPath(); + if ( nonZeroWidth ) { + bar.closeSubPath(); + } - painter_.setShadow(series_.shadow()); - WBrush brush = WBrush(series_.brush()); - SeriesIterator::setBrushColor(brush, xIndex, yIndex, BarBrushColorRole); - painter_.fillPath(bar, brush); + painter_.setShadow(series_.shadow()); + if ( nonZeroWidth ) { + WBrush brush = WBrush(series_.brush()); + SeriesIterator::setBrushColor(brush, xIndex, yIndex, BarBrushColorRole); + painter_.fillPath(bar, brush); + } painter_.setShadow(WShadow()); @@ -1375,8 +1383,8 @@ renderGrid(painter, axis(XAxis)); renderGrid(painter, axis(Y1Axis)); renderGrid(painter, axis(Y2Axis)); - renderSeries(painter); // render the data series renderAxes(painter, Line | Labels); // render the axes (lines & labels) + renderSeries(painter); // render the data series renderLegend(painter); }