Skip to content

Commit

Permalink
Merge pull request #3685 from greenbone/fix-line-chart-vx-scale
Browse files Browse the repository at this point in the history
Fix: Adjust scale in line chart to new vx version
  • Loading branch information
swaterkamp authored Apr 18, 2023
2 parents 8cd95c6 + 707f78d commit 3c6bdf9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/web/components/chart/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,25 +529,21 @@ class LineChart extends React.Component {
<Group>
<LinePath
data={data}
x={d => xValue(d, timeline)}
y={d => d.y}
x={d => xScale(xValue(d, timeline))}
y={d => yScale(d.y)}
stroke={yLine.color}
strokeWidth={isDefined(yLine.lineWidth) ? yLine.lineWidth : 1}
strokeDasharray={yLine.dashArray}
xScale={xScale}
yScale={yScale}
/>
<LinePath
data={data}
x={d => xValue(d, timeline)}
y={d => d.y2}
x={d => xScale(xValue(d, timeline))}
y={d => y2Scale(d.y2)}
stroke={y2Line.color}
strokeWidth={
isDefined(y2Line.lineWidth) ? y2Line.lineWidth : 1
}
strokeDasharray={y2Line.dashArray}
xScale={xScale}
yScale={y2Scale}
/>
</Group>
)}
Expand Down

0 comments on commit 3c6bdf9

Please sign in to comment.