You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's a bit unfortunate at the moment, but is not likely to change before the Major update with 1.0.0. You can use an ugly selector approach as a workaround. .ct-label:nth-child(1), .ct-label:nth-child(2) etc.
@gionkunz I have the same problem. Your suggested solution fixes it, unless you have a 0 value (for example [0, 6, 7], and ignoreEmptyValues: true. When this is the case, In series-b.ct-label:nth-child(1) and in series-c.ct-label:nth-child(2) are shown (instead of label 2 & 3)
To fix this problem I set ignoreEmptyValues: false and created a labelInterpolationFnc that returns ' ' if value === 0, but that is very hacky.
My suggested solution is that the className of the 'slice', like 'series-a' or 'my-custom-class-name' is set on the label as well. I created a PR for it: https://github.com/gionkunz/chartist-js/pull/1198
I'm using a donut chart like in the examples:
The produced HTML code (FRAGMENT) is
As you can see I'm not able to customize with CSS the two labels differently, because they have the same class. Even if I set up
I would expect to obtain
The text was updated successfully, but these errors were encountered: