Monday 9 November 2020

Highcharts - linear regression that changes according to vertical line

I have a question that is a follow-up on this question here: Two synchronized vertical lines in highcharts

I just came across this nice example of how to draw a linear fit in Highcharts: https://codepen.io/mushigh/pen/ZEQxXOz

Now, my question is: using this live demo, how could I implement linear fits that change according to the drag of the line?

What I am looking for is:

  • Linear fit from the beginning until the first vertical line;
  • Linear fit from the first until the second vertical line;
  • And linear fit from the second vertical line until the end.

Since the vertical lines are draggable, I am not sure this is possible?


Update:

This extension might get things easier: https://github.com/streamlinesocial/highcharts-regression



from Highcharts - linear regression that changes according to vertical line

No comments:

Post a Comment