diff options
author | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2010-11-30 01:45:03 +0100 |
---|---|---|
committer | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2010-11-30 01:45:03 +0100 |
commit | edaa216847e59ad93b8b99e95f293f8bb04344cc (patch) | |
tree | 7193a7fdd5a3520b21755c675cb4d3de4e3100cb /chart2/source/model | |
parent | 0e5566e9ff510bedc9837e12ee37103c553897da (diff) |
chart46: #i25706# implement date axis
Diffstat (limited to 'chart2/source/model')
-rw-r--r-- | chart2/source/model/template/ChartTypeTemplate.cxx | 15 |
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 ); } } |