-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: trendoffset or trendrange #87
Comments
I missed to post a modified line above. The forEach loop needs to skipp till firstIndex is reached, so it looks like this:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be nice to be able to do the trendline just for some part or range of the data.
In my case just for the last 10 elements. I did a quick hack and implemented a trendoffset parameter.
If > 0 it skips the first n elements, if < 0 it uses the last n elements.
The patch alters the firstIndex initialisation accordingly.
My code looks like this:
...
let fitter = new LineFitter();
...
The config looks like this:
trendlineLinear: {
trendoffset: -10,
...
},
The text was updated successfully, but these errors were encountered: