Skip to content

Commit 2dec3b0

Browse files
committed
Merge pull request #766 from indiespirit/issue765
Issue #765: Use transform instead of deprecated rotation/origin Fixes #765.
2 parents a237047 + d069e06 commit 2dec3b0

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/AbstractChart.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,7 @@ class AbstractChart<
267267
paddingTop;
268268
return (
269269
<Text
270-
rotation={horizontalLabelRotation}
271-
origin={`${x}, ${y}`}
270+
transform={`rotate(${horizontalLabelRotation}, ${x}, ${y})`}
272271
key={`horizontal-label-${i}-${yLabel}`}
273272
x={x}
274273
textAnchor="end"
@@ -338,8 +337,7 @@ class AbstractChart<
338337

339338
return (
340339
<Text
341-
origin={`${x}, ${y}`}
342-
rotation={verticalLabelRotation}
340+
transform={`rotate(${verticalLabelRotation}, ${x}, ${y})`}
343341
key={`vertical-label-${i}-${label}`}
344342
x={x}
345343
y={y}

0 commit comments

Comments
 (0)