summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2012-07-31 11:42:28 +0000
committerAndre Fischer <af@apache.org>2012-07-31 11:42:28 +0000
commita5f420bed1967c563cdd3e32ad14d2891ef59f2e (patch)
tree5db6cc0a930f78562a1ad134664f53a13a9cde26 /chart2
parent9df4b5b7c873ea460628819a3ab01a49985398da (diff)
#i120271# Fixed automatical scaling of vertical chart axis.
Patch by: bo.tian Review by: Andre Fischer
Notes
Notes: prefer: 70afe780231dc086a07494db97a2bac2ca0a0939
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 8b8b627e9835..8d15debe77dd 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1537,12 +1537,23 @@ void VDataSeriesGroup::getMinimumAndMaximiumYInContinuousXRange( double& rfMinY,
if( fX < fMinX || fX > fMaxX )
continue;
double fY = (*aSeriesIter)->getYValue( nN );
+
if( ::rtl::math::isNan(fY) )
continue;
if(rfMaxY<fY)
rfMaxY=fY;
if(rfMinY>fY)
rfMinY=fY;
+ ////for stockchart with candlestick start
+ //todo:stockchart with candlestick has no values-y but values-min,values-max,values-first and values-last
+ //also check values-min,values-max for max and min value
+ double fYmax = (*aSeriesIter)->getY_Max( nN );
+ double fYmin = (*aSeriesIter)->getY_Min( nN );
+ if(!::rtl::math::isNan(fYmax))
+ if( rfMaxY<fYmax) rfMaxY=fYmax;
+ if(!::rtl::math::isNan(fYmin))
+ if( rfMinY>fYmin) rfMinY=fYmin;
+ ////for stockchart with candlestick end
}
}
if(::rtl::math::isInf(rfMinY))