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

Add class name of series to its label element in pie charts #1198

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

petervtzand
Copy link

@petervtzand petervtzand commented Nov 18, 2019

Problem

This fixes this issue, it makes sure the labels get the same 'series-X' class name (or custom className if given) as their corresponding slices. This is needed because then we can style the labels without having to use 'nth-child'.

Solution

Add className on the label element, that corresponds with the correct slice. Set

  • custom className if set
  • otherwise set 'series-X'

@petervtzand petervtzand changed the title Add className of the series to the labelElement Add class name of series to the label element in pie charts Nov 18, 2019
@petervtzand petervtzand changed the title Add class name of series to the label element in pie charts Add class name of series to its label element in pie charts Nov 18, 2019
@dangreen dangreen force-pushed the develop branch 5 times, most recently from f818b93 to 3173275 Compare July 30, 2022 09:48
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

Successfully merging this pull request may close these issues.

Pie chart series name class for text ct-label element
1 participant