Skip to content
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

Expose classes for graph elements #2442

Open
JavierM42 opened this issue Oct 4, 2023 · 2 comments
Open

Expose classes for graph elements #2442

JavierM42 opened this issue Oct 4, 2023 · 2 comments
Labels

Comments

@JavierM42
Copy link

Is your feature request related to a problem? Please describe.
I need to add a pointer cursor to a pie chart's arcs, and was disappointed when I found no easy way to do it. I read a suggestion to add the style on mouse enter using Javascript. However, I think a more declarative approach based on CSS would make this easier, more performant and support more use cases.

Describe the solution you'd like
I'd like graph elements (my use case is specifically for arcs and bars but I can imagine labels and other elements being useful too in certain cases) to have distinct class names, so I can style them with CSS.

Describe alternatives you've considered

  • The svg > g > g > path selector does the trick for me, but is closely tied to implementation details that may change without notice.
  • The onMouseEnter event also works, but feels overkill and adds extra JS that isn't really needed.
@plouc
Copy link
Owner

plouc commented Nov 16, 2023

Hi @JavierM42,

I've always been a bit reluctant to rely on CSS for styling, because it's not supported for canvas implementations, but it seems like most users rely on the SVG implementation of the charts, so it would certainly help most users. I'll consider this feature.

Copy link

stale bot commented Mar 13, 2024

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants