summaryrefslogtreecommitdiff
path: root/chart2/source/view/charttypes/VSeriesPlotter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/view/charttypes/VSeriesPlotter.cxx')
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 5acd2d587914..e0b25ba74811 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -530,7 +530,13 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
}
case DataPointCustomLabelFieldType_PERCENTAGE:
{
- aTextList[i] = getLabelTextForValue( rDataSeries, nPointIndex, fValue, true );
+ if(fSumValue == 0.0)
+ fSumValue = 1.0;
+ fValue /= fSumValue;
+ if(fValue < 0)
+ fValue *= -1.0;
+
+ aTextList[i] = getLabelTextForValue(rDataSeries, nPointIndex, fValue, true);
break;
}
case DataPointCustomLabelFieldType_CELLREF: