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
Label and title styles must be set through the labelStyle and titleStyle props respectively.
Labels have inline styles by default, that must be overridden by a labelStyle prop to be changed (because inline styles override CSS stylesheet styles, a stylesheet selector cannot be used without the !important flag, which is hacky),
Titles have this issue as well, as well as having no class associated with them, so it isn't possible to select them with a CSS child selector.
This makes it very difficult to have a centralized style sheet that manages styles for all charts.
I'm adding this issue so it can be addressed in the refactor.
The text was updated successfully, but these errors were encountered:
It's unfortunate but because label and title use measureText to calculate the smallest amount of possible collisions along the axis, it's dependent on a default fontFamily, size and fontStyle to be sent in. It's definitely hacky for your centralized stylesheet to use !important to override said styles but the best work around off the top of my head without sacrificing measureText's collision detection would be to create a styled label/title component (essentially wrapping label/title and always sending in your preferred styles).
EDIT: Will be sure to add this as disclaimer in the docs!
Label and title styles must be set through the
labelStyle
andtitleStyle
props respectively.Labels have inline styles by default, that must be overridden by a
labelStyle
prop to be changed (because inline styles override CSS stylesheet styles, a stylesheet selector cannot be used without the!important
flag, which is hacky),Titles have this issue as well, as well as having no class associated with them, so it isn't possible to select them with a CSS child selector.
This makes it very difficult to have a centralized style sheet that manages styles for all charts.
I'm adding this issue so it can be addressed in the refactor.
The text was updated successfully, but these errors were encountered: