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

Possibility to style svg #97

Open
Emina-M opened this issue May 28, 2024 · 0 comments
Open

Possibility to style svg #97

Emina-M opened this issue May 28, 2024 · 0 comments

Comments

@Emina-M
Copy link

Emina-M commented May 28, 2024

Hello,

I'm trying to apply some styling to a pie chart, like changing text color and font size of the slice labels, translating the legend and similar. Since the elements of the resulting svg have no id attribute (so that I could use it to apply certain styles), I had to analyse the svg and use this approach:

<style type="text/css">
  g[transform="translate(0,10)"] text {fill: white !important; font-size: 18pt;}
  g[transform="translate(0,10)"] {transform: translate(0px, 0px) scale(0.65);}
  g[transform="translate(300, 20)"] text {font-size: 8pt}
  g[transform="translate(300, 20)"] {transform: translate(196px, 55px) scale(1.3);}
</style>

It would be good to add the possibility to change font size and colors of labels/legend items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant