-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angles not working #250
Comments
Thank you, I thought I was going crazy haha, I wish I could help but I have near 0 experience with SVG's. |
looks like you are adding an angle to a group of text items (as you said the axis) rather to each text item (ie the label)... btw this helped me find my issue which I can fix. (not sure I can fix yours but will revert if I do) |
This is going to sound really dumb, but I fixed my radar chart issue with a small pnpm patch that resets the text transform rotate to 0 for elements with a specific class. You can see the When I set the angle to 90, it's fixed, but I don't want the angle to be in the center: https://github.com/EvHaus/react-pdf-charts/blob/dev/src/index.tsx#L305 case "text":
if (baseProps.transform && attribs.class ===
"recharts-text recharts-polar-radius-axis-tick-value") {
baseProps.transform = baseProps.transform.replace(/rotate\(60(?=,)/g, 'rotate(0')
}
return renderTextElement({
baseProps,
chartStyle,
children: children2,
node
}); This is by no means perfect, but it's close enough for me. Not sure if this helps in diagnosing the root issue. |
I noticed the same behavior when using a rotation on the YAxis label. I.e.
Currently the rotated label ends up on the chart rather than to the left of it. |
Hi, I’m wondering if there’s been any update or potential fix for this issue? |
This is mostly a note to myself. Here's a minimal repro of the issue: An In Some theories that need testing:
Needs further investigation. |
Describe the bug
Whenever you put an angle like so :
It will either disapear (when -90 or 90 +) or got to the middle.
I am using React and Typescript, plus Rechart, all newest versions.
Reproduction
Validations
The text was updated successfully, but these errors were encountered: