diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 2a814e2fd73a..8189ece987e9 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -528,6 +528,11 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re aTextList[i] = DataSeriesHelper::getDataSeriesLabel( xSeries, aRole ); break; } + case DataPointCustomLabelFieldType_PERCENTAGE: + { + aTextList[i] = getLabelTextForValue( rDataSeries, nPointIndex, fValue, true ); + break; + } case DataPointCustomLabelFieldType_CELLREF: { // TODO: for now doesn't show placeholder diff --git a/offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl b/offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl index 0b7f925342a6..05c26a738684 100644 --- a/offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl +++ b/offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl @@ -23,11 +23,12 @@ enum DataPointCustomLabelFieldType SERIESNAME, CATEGORYNAME, CELLREF, - NEWLINE + NEWLINE, + PERCENTAGE }; }; }; }; }; #endif -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ \ No newline at end of file +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index a310549e0535..10edab47fd11 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -245,6 +245,8 @@ DataPointCustomLabelFieldType lcl_ConvertFieldNameToFieldEnum( const OUString& r return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CATEGORYNAME; else if (rField == "CELLREF") return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLREF; + else if (rField == "PERCENTAGE") + return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_PERCENTAGE; else return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT; }