Skip to content

Commit

Permalink
[diagrams] Fix bars drawn outside of registered diagram extent for so…
Browse files Browse the repository at this point in the history
…me orientations
  • Loading branch information
nyalldawson committed Nov 23, 2019
1 parent a72f42b commit abb6438
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/diagram/qgshistogramdiagram.cpp
Expand Up @@ -207,11 +207,11 @@ void QgsHistogramDiagram::renderDiagram( const QgsFeature &feature, QgsRenderCon
break;

case QgsDiagramSettings::Right:
p->drawRect( QRectF( baseX, baseY - scaledWidth * values.size() + currentOffset, length, scaledWidth * -1 ) );
p->drawRect( QRectF( baseX, baseY - scaledWidth * values.size() + currentOffset, length, scaledWidth ) );
break;

case QgsDiagramSettings::Left:
p->drawRect( QRectF( baseX + scaledMaxVal, baseY - scaledWidth * values.size() + currentOffset, 0 - length, scaledWidth * -1 ) );
p->drawRect( QRectF( baseX + scaledMaxVal, baseY - scaledWidth * values.size() + currentOffset, 0 - length, scaledWidth ) );
break;
}

Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit abb6438

Please sign in to comment.