incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1367519 - /incubator/ooo/trunk/main/chart2/source/view/charttypes/VSeriesPlotter.cxx
Date Tue, 31 Jul 2012 12:42:29 GMT
Author: af
Date: Tue Jul 31 12:42:28 2012
New Revision: 1367519

URL: http://svn.apache.org/viewvc?rev=1367519&view=rev
Log:
#i120271# Fixed automatical scaling of vertical chart axis.

          Patch by: bo.tian
          Review by: Andre Fischer

Modified:
    incubator/ooo/trunk/main/chart2/source/view/charttypes/VSeriesPlotter.cxx

Modified: incubator/ooo/trunk/main/chart2/source/view/charttypes/VSeriesPlotter.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/chart2/source/view/charttypes/VSeriesPlotter.cxx?rev=1367519&r1=1367518&r2=1367519&view=diff
==============================================================================
--- incubator/ooo/trunk/main/chart2/source/view/charttypes/VSeriesPlotter.cxx (original)
+++ incubator/ooo/trunk/main/chart2/source/view/charttypes/VSeriesPlotter.cxx Tue Jul 31 12:42:28
2012
@@ -1537,12 +1537,23 @@ void VDataSeriesGroup::getMinimumAndMaxi
             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))



Mime
View raw message