TrendLine using Charts/LineChart

Hi,

I'm trying to create a trend line. I already have the datapoints necessary to calculate this but am using a second Data Series to show them both simulateneously on the Chart. However I tried following these calculations: https://study.com/academy/lesson/what-is-a-trend-line-in-math-definition-equation-analysis.html

This would just be incredibly processing intensive. The chart can have up to 365 data points, and to calculate a for each that loops throught each of the 365 days calculating the differences in X and Y (365 times for each day) would just be unfaesible. Is there a simpler way? Has anyone looked into this before?

Thanks in avance for any replies!

Hi,

You need to use a plugin https://www.highcharts.com/plugin-registry/single/22/Highcharts%20regression, all you have to worry is getting the data and leave the trend line plotting to Highchart.

Once I become free, I can try to create a sample app tomorrow and post it here.

Regards.

Hi,

As promised, please find the attached sample.

Regards.