Skip to content

Commit

Permalink
fix: replace estimated time with lineChanges in lower graph
Browse files Browse the repository at this point in the history
Ref:#237
Time-spent: 0h2m
  • Loading branch information
TBalint2000 committed Jul 16, 2024
1 parent eedf224 commit a2bbf9b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function drawLowerChart(data: CommitChartData[]) {
.padding(0.1);

const y = d3.scaleLinear()
.domain([0, d3.max(data, d => d.timeSpent.estimated)])
.domain([0, d3.max(data, d => Math.log2(d.lineChanges))])
.nice()
.range([0, height]);

Expand All @@ -185,7 +185,7 @@ function drawLowerChart(data: CommitChartData[]) {
.attr("x", d => x(d.date.toString()))
.attr("y", 0) // Set y to 0 to start from the top
.attr("width", x.bandwidth())
.attr("height", d => y(d.timeSpent.estimated)) // Height is directly proportional to the estimated time spent
.attr("height", d => y(Math.log2(d.lineChanges))) // Height is directly proportional to the estimated time spent
.attr("fill", d => color(d.commitType[0].label));
}

Expand Down

0 comments on commit a2bbf9b

Please sign in to comment.