streamlinesocial / highcharts-regression

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

regression curves for multiple series via data module #93

Open bmcnoldy opened 5 years ago

bmcnoldy commented 5 years ago

I am trying to get Loess regressions added for several series all imported via the data module (csvURL). But for starters, getting the default working would be great. So in the chart, I have data: { csvURL: window.location.origin + '/file.csv' }, That works fine for plotting and customizing all of the series included in that file. series: [{ marker: { enabled: false, symbol: 'circle' }, {},{},etc. }],

But when I add the regression for any one or all of them, nothing happens. All of the examples I found had the "data" attribute defined in the series object. I was hoping that the regression function would inherit the appropriate data values for each series. (I also tried adding the dummy "data:[]," in each series along with "regression:true," but that didn't change the outcome).

Is there a way to use the data module and apply regression curves to any/all of the series that were imported?

Thanks, Brian

bmcnoldy commented 3 years ago

I left this go for a while, but would like to revisit it. I messed around again without success. Is there a way to use this handy regression tool in combination with the data object created by csvURL? (my CSV file has a date column and 5 series columns, and I'd like to apply a Loess regression to 3 of the 5 series)