BCGSuite for MFC
virtual void CBCGPChartSeries::AddDataPointsOptimized ( const CBCGPDoubleArray &  arYValues,
CBCGPDoubleArray *  pXValues = NULL,
CBCGPDoubleArray *  pY1Values = NULL,
BOOL  bRecalcMinMaxValues = FALSE 

Add batch of data point optimally

Call this method to add batch of data points at once. In addition, this method enables a special "optimized" mode, which allows to display millions of data points keeping small memory footprint by storing data points in arrays of doubles. Because of that you lose the ability to customize data points individually, but gain very high performance. The related X axis will work in "indexed" mode combined with "fixed interval width" mode. The "fixed interval width" mode is based on fixed grid size with fixed number of data points within grid cell. You can adjust these parameters by calling CBCGPChartAxis::SetFixedIntervalWidth. Axis zoom in this case changes number of values per interval from 1 (max zoom in) to nGridSize (max zoom out).

CBCGPChartDataPoint objects in this mode are virtualized and returned via dummy wrapper, therefore you must use CBCGPChartSeries interface and data point indexes to get/set data (or perform any other operations).

It's recommended to keep Y axis scroll and zoom disabled (it's done automatically- do not re-enable them).

Note. If a series works in "history mode" (you have called EnableHistoryMode(TRUE)), then this method calls AddDataPoints() and optimized mode is not activated. If you wish to emulate history mode in "optimized long data mode" you need to access arrays of values directly and remove the oldest values (see GetLongDataX(), GetLongDataY(), GetLongDataY1() methods).

arYValuesArray of Y values.
pXValuesA pointer to array of X values. If NULL, X component will be treated as empty.
pY1ValuesA pointer to array of Y1 values for range charts. Can be NULL.
bRecalcMinMaxValuesTRUE - recalculates minimum and maximum Y values for the series.