Closed
Description
Describe the bug
I'm unable to render a custom ReferenceDot on a ScatterChart, as there seems to be an issue with the use of the <svg/>
tag.
Reproduction
https://stackblitz.com/edit/react-pdf-charts-starter-wzl2bp?file=src%2FApp.tsx
const CustomShape = (props) => {
const { cx, cy } = props;
return (
<svg x={cx - 10} y={cy - 10} width={20} height={20} fill="red" viewBox="0 0 24 24">
<path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" />
</svg>
);
}
<ReferenceDot x={500} y={500} shape={CustomShape} />
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that you're confident that this is a legitimate bug. To ask a question open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.