public/libraries.js
function () {
            var series = this,
              options = series.options,
              dataOptions = options.data,
              data = series.data,
              dataLength,
              processedXData = series.processedXData,
              processedYData = series.processedYData,
              pointClass = series.pointClass,
              processedDataLength = processedXData.length,
              cropStart = series.cropStart || 0,
              cursor,
              hasGroupedData = series.hasGroupedData,
              point,
              points = [],
              i;

            if (!data && !hasGroupedData) {
                var arr = [];
                arr.length = dataOptions.length;
                data = series.data = arr;
            }

            for (i = 0; i < processedDataLength; i++) {
                cursor = cropStart + i;
                if (!hasGroupedData) {
                    if (data[cursor]) {
                        point = data[cursor];
                    } else if (dataOptions[cursor] !== UNDEFINED) { // #970
                        data[cursor] = point = (new pointClass()).init(series, dataOptions[cursor], processedXData[i]);
                    }
                    points[i] = point;
                } else {
                    // splat the y data in case of ohlc data array
                    points[i] = (new pointClass()).init(series, [processedXData[i]].concat(splat(processedYData[i])));
                }
                points[i].index = cursor; // For faster access in Point.update
            }

            // Hide cropped-away points - this only runs when the number of points is above cropThreshold, or when
            // swithching view from non-grouped data to grouped data (#637)
            if (data && (processedDataLength !== (dataLength = data.length) || hasGroupedData)) {
                for (i = 0; i < dataLength; i++) {
                    if (i === cropStart && !hasGroupedData) { // when has grouped data, clear all points
                        i += processedDataLength;
                    }
                    if (data[i]) {
                        data[i].destroyElements();
                        data[i].plotX = UNDEFINED; // #1003
                    }
                }
            }

            series.data = data;
            series.points = points;
        }
function () {
            var series = this,
              options = series.options,
              dataOptions = options.data,
              data = series.data,
              dataLength,
              processedXData = series.processedXData,
              processedYData = series.processedYData,
              pointClass = series.pointClass,
              processedDataLength = processedXData.length,
              cropStart = series.cropStart || 0,
              cursor,
              hasGroupedData = series.hasGroupedData,
              point,
              points = [],
              i;

            if (!data && !hasGroupedData) {
                var arr = [];
                arr.length = dataOptions.length;
                data = series.data = arr;
            }

            for (i = 0; i < processedDataLength; i++) {
                cursor = cropStart + i;
                if (!hasGroupedData) {
                    if (data[cursor]) {
                        point = data[cursor];
                    } else if (dataOptions[cursor] !== UNDEFINED) { // #970
                        data[cursor] = point = (new pointClass()).init(series, dataOptions[cursor], processedXData[i]);
                    }
                    points[i] = point;
                } else {
                    // splat the y data in case of ohlc data array
                    points[i] = (new pointClass()).init(series, [processedXData[i]].concat(splat(processedYData[i])));
                }
                points[i].index = cursor; // For faster access in Point.update
            }

            // Hide cropped-away points - this only runs when the number of points is above cropThreshold, or when
            // swithching view from non-grouped data to grouped data (#637)
            if (data && (processedDataLength !== (dataLength = data.length) || hasGroupedData)) {
                for (i = 0; i < dataLength; i++) {
                    if (i === cropStart && !hasGroupedData) { // when has grouped data, clear all points
                        i += processedDataLength;
                    }
                    if (data[i]) {
                        data[i].destroyElements();
                        data[i].plotX = UNDEFINED; // #1003
                    }
                }
            }

            series.data = data;
            series.points = points;
        }
function ( ) { var series = this , options = series . options , dataOptions = options . data , data = series . data , dataLength , processedXData = series . processedXData , processedYData = series . processedYData , pointClass = series . pointClass , processedDataLength = processedXData . length , cropStart = series . cropStart || 0 , cursor , hasGroupedData = series . hasGroupedData , point , points = [ ] , i ; if ( ! data && ! hasGroupedData ) { var arr = [ ] ; arr . length = dataOptions . length ; data = series . data = arr ; } for ( i = 0 ; i < processedDataLength ; i ++ ) { cursor = cropStart + i ; if ( ! hasGroupedData ) { if ( data [ cursor ] ) { point = data [ cursor ] ; } else if ( dataOptions [ cursor ] !== UNDEFINED ) { // #970 data [ cursor ] = point = ( new pointClass ( ) ) . init ( series , dataOptions [ cursor ] , processedXData [ i ] ) ; } points [ i ] = point ; } else { // splat the y data in case of ohlc data array points [ i ] = ( new pointClass ( ) ) . init ( series , [ processedXData [ i ] ] . concat ( splat ( processedYData [ i ] ) ) ) ; } points [ i ] . index = cursor ; // For faster access in Point.update } // Hide cropped-away points - this only runs when the number of points is above cropThreshold, or when // swithching view from non-grouped data to grouped data (#637) if ( data && ( processedDataLength !== ( dataLength = data . length ) || hasGroupedData ) ) { for ( i = 0 ; i < dataLength ; i ++ ) { if ( i === cropStart && ! hasGroupedData ) { // when has grouped data, clear all points i += processedDataLength ; } if ( data [ i ] ) { data [ i ] . destroyElements ( ) ; data [ i ] . plotX = UNDEFINED ; // #1003 } } } series . data = data ; series . points = points ; }
Generate the data point after the data has been processed by cropping away
unused points and optionally grouped in Highcharts Stock.
Generate the data point after the data has been processed by cropping away unused points and optionally grouped in Highcharts Stock .