Skip to content

Commit

Permalink
Adjust line rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismiceli committed Apr 30, 2024
1 parent b1c013a commit 3993c47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/svgGraphs.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,9 @@ const {barLineGraph, stackedAreaGraph, pieGraph} = (function () {
}, []);

if (seriesToRender === "line" && seriesData.type === "line") {
let lineOffset = xValues.length >= 2 ? (x(1) - x(0)) / 2 : 0;
const line = d3.line()
.x((d, i) => x(i))
.x((d, i) => x(i) + lineOffset)
.y(({value}) => y(value));

svg.append("path")
Expand Down

0 comments on commit 3993c47

Please sign in to comment.