-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Brush styling issue #4705
Comments
Hi! Can you paste some code? Specifically what are your values for tickMargin and your Brush props? Here is a codesandbox you can fork https://codesandbox.io/p/sandbox/bar-chart-with-brush-forked-5vghcf Thanks |
Hello @ckifer and thanks for your message. The problem is : Working with the design team, i need to put some margin for the tick so i used the Is there a way to do it faster or cleaner by putting some component in relative position ? idk Here is my code.
Thanks a lot for your time |
Hey! correct, everything is absolute (it has to be in svg-land). We can work around this one way for now which is to render a custom traveler, save the Y value of that in a ref, and then use that Y value to adjust the Y of the brush itself. https://codesandbox.io/p/sandbox/bar-chart-with-brush-forked-5vghcf This is a workaround since there isn't any other way to do it at the moment, but it does the trick |
Hi @ckifer , thanks for your response. I'll try and use that 🚀 |
Hellooo !
I'm using Recharts Recharts 2.12.7 and i'm struggling with adding some margin to the Brush component as you can see ⬇️.
I've added some TickMargin to XAxisis which is causing a problem with the brush.
So i tried adding some margin-top, padding etc to the brush but it's not working, adding a
position
to the element etc etcDigging in Google a lot but nothing about adding a specific style to Brush.
Is it possible ?
Thanks
The text was updated successfully, but these errors were encountered: