Skip to content
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

Trendline ignores data when Y=0 #560

Open
millaalcoforado opened this issue Nov 30, 2018 · 0 comments
Open

Trendline ignores data when Y=0 #560

millaalcoforado opened this issue Nov 30, 2018 · 0 comments
Labels

Comments

@millaalcoforado
Copy link

When Y=0, the code ignores this point (X,Y) in the formulas. Why?

code:
for (; n < data.length; n++) {
if (data[n][1]) {
sum[0] += data[n][0];
sum[1] += data[n][1];
sum[2] += data[n][0] * data[n][0];
sum[3] += data[n][0] * data[n][1];
sum[4] += data[n][1] * data[n][1];
}
}

This example is from the linear trendline. But this behavior happens in all types. I understand that Y cannot be 0 for the power and the exponential types.

@Mavrin Mavrin added the question label Dec 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants