Skip to content

Commit 45c31e9

Browse files
benurbplouc
authored andcommittedMay 10, 2022
fix(line): make copy of points data before reversing
1 parent 165d8a8 commit 45c31e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/line/src/Points.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const Points = ({ points, symbol, size, borderWidth, enableLabel, label, labelYO
1818
* We reverse the `points` array so that points from the lower lines in stacked lines
1919
* graph are drawn on top. See https://github.com/plouc/nivo/issues/1051.
2020
*/
21-
const mappedPoints = points.reverse().map(point => {
21+
const mappedPoints = points.slice(0).reverse().map(point => {
2222
const mappedPoint = {
2323
id: point.id,
2424
x: point.x,

0 commit comments

Comments
 (0)
Please sign in to comment.