summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-03-27 00:21:43 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-03-27 00:22:22 +0100
commitda46a0cbcc656dea15a42d4cfc10e2058258b8cc (patch)
treee08430d927cb326723a853a850f33d2700eef239
parent0b4712812fa78b5bbfb9313c36a14f46e1bc662d (diff)
show negative values correctly in pie charts, fdo#69143
Change-Id: I2a33095f7dceb564911478a30aed1137ddacd531
-rw-r--r--chart2/source/view/charttypes/PieChart.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 81d35394a521..d4636eec9879 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -488,13 +488,14 @@ void PieChart::createShapes()
aScreenPosition2D.Y += aDirection.getY();
}
+ double nVal = pSeries->getYValue( nPointIndex );
aPieLabelInfo.xTextShape = this->createDataLabel( xTextTarget, *pSeries, nPointIndex
- , fLogicYValue, fLogicYSum, aScreenPosition2D, eAlignment );
+ , nVal, fLogicYSum, aScreenPosition2D, eAlignment );
uno::Reference< container::XChild > xChild( aPieLabelInfo.xTextShape, uno::UNO_QUERY );
if( xChild.is() )
aPieLabelInfo.xLabelGroupShape = uno::Reference<drawing::XShape>( xChild->getParent(), uno::UNO_QUERY );
- aPieLabelInfo.fValue = fLogicYValue;
+ aPieLabelInfo.fValue = nVal;
aPieLabelInfo.bMovementAllowed = bMovementAllowed;
aPieLabelInfo.bMoved= false;
aPieLabelInfo.xTextTarget = xTextTarget;