streamlinesocial / highcharts-regression

Linear and non-linear regression support for highcharts
MIT License
73 stars 64 forks source link

Module assumes existing series #78

Open borys-p opened 6 years ago

borys-p commented 6 years ago

Looks like the module assumes that the Highcharts object will always have some series present and that's not always true. I'm initializing an empty chart and loading all data in the background. Which makes the module fail here:

var series = arguments[1].series;

The most obvious fix is a simple check for this property.