Skip to content

Commit 742a60a

Browse files
bugfix
1 parent 19af6b3 commit 742a60a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/arrow.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
export const arrowTransform = {
22
get: ({data, xScale, yScale}) => {
3+
if (data.length < 2) {
4+
return 'translate(0, 0) rotate(0)';
5+
}
6+
37
const l = data.length;
48
const x2 = xScale(data[l - 1][0]);
59
const x1 = xScale(data[l - 2][0]);

0 commit comments

Comments
 (0)