mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: dcolazin <51136913+dcolazin@users.noreply.github.com>
This commit is contained in:
parent
4b4b06fe9c
commit
78e74925a6
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ function calcSlope(data: Array<{ x: number; y: number }>) {
|
|||
const xySum = data.reduce((prev, curr) => prev + curr.y * curr.x, 0);
|
||||
const xSqSum = data.reduce((prev, curr) => prev + curr.x * curr.x, 0);
|
||||
const numerator = length * xySum - xSum * ySum;
|
||||
const denominator = length * xSqSum - xSum * ySum;
|
||||
const denominator = length * xSqSum - xSum * xSum;
|
||||
const slope = numerator / denominator;
|
||||
|
||||
if (slope) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue