We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19af6b3 commit 742a60aCopy full SHA for 742a60a
src/arrow.js
@@ -1,5 +1,9 @@
1
export const arrowTransform = {
2
get: ({data, xScale, yScale}) => {
3
+ if (data.length < 2) {
4
+ return 'translate(0, 0) rotate(0)';
5
+ }
6
+
7
const l = data.length;
8
const x2 = xScale(data[l - 1][0]);
9
const x1 = xScale(data[l - 2][0]);
0 commit comments