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
Is your feature request related to a problem? Please describe.
I'd like to have a way to apply formatting to individual rendered elements.
Describe the solution you'd like
I'd like to have a .className(node) function that lets me apply classes to the SVG that is being rendered for each node.
.className(node)
Describe alternatives you've considered
I'm doing this now like this:
setTimeout(() => { const rectElements = document.querySelectorAll('#chart rect') // Do stuff with rectElements }, 0)
However, it's tricky, since I can't easily introspect the DOM elements to determine which ones correspond to which nodes in the tree.
As an alternative to emitting class names, there could be a visitor function that receives both the rendered DOM node and the data node it came from.
The setTimeout is also a bit icky.
setTimeout
Additional context
If this makes sense to you, I might be able to contribute it at some point in the future.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your feature request related to a problem? Please describe.
I'd like to have a way to apply formatting to individual rendered elements.
Describe the solution you'd like
I'd like to have a
.className(node)
function that lets me apply classes to the SVG that is being rendered for each node.Describe alternatives you've considered
I'm doing this now like this:
However, it's tricky, since I can't easily introspect the DOM elements to determine which ones correspond to which nodes in the tree.
As an alternative to emitting class names, there could be a visitor function that receives both the rendered DOM node and the data node it came from.
The
setTimeout
is also a bit icky.Additional context
If this makes sense to you, I might be able to contribute it at some point in the future.
The text was updated successfully, but these errors were encountered: