Skip to content

Commit 79d537a

Browse files
committed
Place pie charts on point
1 parent 98e637c commit 79d537a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/qgsdiagram.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ void QgsPieDiagram::renderDiagram( const QgsAttributeMap& att, QgsRenderContext&
293293
double w = spu.width();
294294
double h = spu.height();
295295

296-
double baseX = position.x();
297-
double baseY = position.y() - h;
296+
double baseX = position.x() - w / 2;
297+
double baseY = position.y() - h / 2;
298298

299299
mPen.setColor( s.penColor );
300300
setPenWidth( mPen, s, c );

0 commit comments

Comments
 (0)