1

I need to draw trend-line on simple line graph in c3js but i can't seem to find a built-in way to do that? If that's not possible, how do i calculate trend-line (linear regression) data to display on the chart?

Thanks

Goran Radulovic
  • 1,987
  • 3
  • 16
  • 23
  • What is 'trend-line'? How does it supposed to look like? What data do you have? You should explain what you want more precisely for us to help – Vlad Zhukov Jan 30 '16 at 19:41
  • I know of that term from Excel, but i think it's proper name is Linear Regression. I'll update my question. Thanks. – Goran Radulovic Jan 30 '16 at 19:52

1 Answers1

2

There isn't a built-in solution (yet), but I'll put in my two cents in case someone can create something for c3.js specifically.

You may have to calculate the start/end points using one of these methods:

There are also D3.js solutions here:

Community
  • 1
  • 1
NeonDevil
  • 106
  • 1
  • 9