summaryrefslogtreecommitdiffstats
path: root/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/PieChart.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index fff4e9872ad1..e8fc6892d89d 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -449,9 +449,15 @@ void PieChart::createShapes()
}
sal_Int32 nLabelPlacement = pSeries->getLabelPlacement( nPointIndex, m_xChartTypeModel, m_nDimension, m_pPosHelper->isSwapXAndY() );
+
+ // AVOID_OVERLAP is in fact "Best fit" in the UI.
bool bMovementAllowed = ( nLabelPlacement == ::com::sun::star::chart::DataLabelPlacement::AVOID_OVERLAP );
if( bMovementAllowed )
- nLabelPlacement = ::com::sun::star::chart::DataLabelPlacement::OUTSIDE;
+ // Use center for "Best fit" for now. In the future we
+ // may want to implement a real best fit algorithm.
+ // But center is good enough, and close to what Excel
+ // does.
+ nLabelPlacement = ::com::sun::star::chart::DataLabelPlacement::CENTER;
LabelAlignment eAlignment(LABEL_ALIGN_CENTER);
sal_Int32 nScreenValueOffsetInRadiusDirection = 0 ;