highslide-software/highcharts.com — Issue #736: series.addPoint fails when adding point to hidden series
Author: akovac
Created: 2012-02-03 15:24:57+00:00
State: open

Tested with highstock 1.1.3.

Uncaught TypeError: Cannot read property 'length' of null
Series.getAttribshighstock-1.1.3.src.js:10885
Series.addPointhighstock-1.1.3.src.js:10219

Error is objserved when trying to add point to hidden series like this:

priceSeries = m_chart.get(priceSeriesId);
assert(priceSeries, 'Price series not initialized: ' + priceSeriesId);
priceSeries.addPoint(dataPoint.price, false, false);

It looks like series.points is null if series is hidden so points.length fails!

Missing if (points) check, thanks.