Goran Radulovic
Goran Radulovic

Reputation: 1987

Drawing trend-line on the line diagram in c3js

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

Upvotes: 1

Views: 2610

Answers (1)

NeonDevil
NeonDevil

Reputation: 106

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:

Upvotes: 2

Related Questions