We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation .
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
Use the content property to render custom content in a Label component. Return an element other than a Text component. In the provided example, the custom x-axis Label is rendering a Text component. The y-axis Label is rendering a <div> containing a Text component. The x-axis content can be seen as expected but the the y-axis content is being rendered but cannot be seen anywhere.
content
<div>
The element should be rendered and displayed where the label content should be.
The elements are rendered in the DOM but cannot be seen anywhere. Hovering over them in the Elements tab of DevTools does not show them displayed anywhere on the page.
The text was updated successfully, but these errors were encountered:
It seems that the label is rendered, but with width and height of zero. That certainly seems like a bug. ??
Sorry, something went wrong.
Generally the things within an SVg need to be svgs because they need absolute positioning. You could put something other than an SVg within a foreign Object tag but it still needs absolute positioning
Thanks, @ckifer . I've tried that here but it still isn't being displayed.
The tag is < foreignObject >
Sorry I'm on mobile so I can't modify the sandbox
@ckifer That worked, thanks. It might be useful to add this info to the documentation.
Feel free to open a PR! But agreed this can be explained in the docs somewhere
I believe it makes sense to add an example to storybook, or a comment to the type of content. Both would help for other users to discover how this works. I added the docs needed tag thus.
docs needed
No branches or pull requests