summaryrefslogtreecommitdiff
path: root/chart2/source/model
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/model')
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index e3943e9eb45f..498be4e2daf9 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -651,9 +651,18 @@ void ChartTypeTemplate::adaptScales(
{
ScaleData aData( xAxis->getScaleData() );
aData.Categories = xCategories;
- aData.AxisType = bSupportsCategories ? AxisType::CATEGORY : AxisType::REALNUMBER;
- if( bSupportsCategories )
- AxisHelper::removeExplicitScaling( aData );
+ if(bSupportsCategories)
+ {
+ if( aData.AxisType != AxisType::CATEGORY && aData.AxisType != AxisType::DATE )
+ {
+ aData.AxisType = AxisType::CATEGORY;
+ aData.AutoDateAxis = true;
+ AxisHelper::removeExplicitScaling( aData );
+ }
+ }
+ else
+ aData.AxisType = AxisType::REALNUMBER;
+
xAxis->setScaleData( aData );
}
}