diff options
author | Kurt Nordback <kurt.nordback@protonmail.com> | 2023-08-31 18:39:02 -0600 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-02-09 11:03:22 +0100 |
commit | 800b767f13d4fe9c7e7fc3271427a7193e17dbb6 (patch) | |
tree | babde06f6f6ff82d26402090c2dcc3abaf629bd9 /chart2/source/model | |
parent | c170d1364be56d91fd16f255ffdc406b8e822732 (diff) |
tdf#50934: Ensure BarOfPie has ScaleData::ShiftedCategoryPosition == false
Change-Id: I86c7ba4df89a1350f544345938a29c210903c06d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160722
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model')
-rw-r--r-- | chart2/source/model/template/ChartTypeTemplate.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index 670391422a85..e91eab13e4e9 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -571,7 +571,13 @@ void ChartTypeTemplate::adaptScales( rtl::Reference< ChartType > xChartType = getChartTypeForNewSeries2({}); if( aData.AxisType == AxisType::CATEGORY ) { - aData.ShiftedCategoryPosition = m_aServiceName.indexOf("Column") != -1 || m_aServiceName.indexOf("Bar") != -1 || m_aServiceName.endsWith("Close"); + // Shift for Column, Hi-Lo-Close, and regular + // Bar types, but not BarOfPie + aData.ShiftedCategoryPosition = + m_aServiceName.indexOf("Column") != -1 || + (m_aServiceName.indexOf("Bar") != -1 && + !m_aServiceName.indexOf("BarOfPie")) || + m_aServiceName.endsWith("Close"); } bool bSupportsDates = ::chart::ChartTypeHelper::isSupportingDateAxis( xChartType, nDimensionX ); if( aData.AxisType != AxisType::CATEGORY && ( aData.AxisType != AxisType::DATE || !bSupportsDates) ) |