Skip to content

Commit

Permalink
remove: trend coeff label
Browse files Browse the repository at this point in the history
  • Loading branch information
apskhem committed Dec 14, 2021
1 parent 38d6f48 commit 546a940
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/client/scripts/trend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export const getTrend = (data: TrendData, keys: string[]) => {
const x2 = yValues.size + 1;
const y2 = leastSquaresCoeff[0] * xSeries.length + leastSquaresCoeff[1];
const trendData = [[ x1, y1, x2, y2 ]];
// const trendSlope = (y2 - y1) / (x2 - x1) * (y2 - y1);

const trendline = svg.selectAll(".trendline")
.data(trendData);
Expand All @@ -177,14 +178,12 @@ export const getTrend = (data: TrendData, keys: string[]) => {
.attr("stroke-width", 1.5)
.attr("stroke-dasharray", "4 2");

const trendCoeff = leastSquaresCoeff[0] * leastSquaresCoeff[2];

svg.append("text")
.text(`trend coeff: ${(trendCoeff).toFixed(3)} (${getTrendKeyword(trendCoeff)})`)
/* svg.append("text")
.text(`trend coeff: ${(trendSlope).toFixed(3)} (${getTrendKeyword(trendSlope)})`)
.attr("class", "text-label")
.attr("x", xScale(2))
.attr("y", y(maxYScale))
.attr("font-size", 10);
.attr("font-size", 10); */

// Add the brushing
/* areaChart
Expand Down

0 comments on commit 546a940

Please sign in to comment.