-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
AST trows a warning for a button with theme with states #15178
Comments
…-warning bugfix/15178-theme-console-warning
@TorsteinHonsi @KacperMadej @DJTechnoo I'm seeing this warning in HC 10.0.0... seems to have re-appeared? Steps to reproduce:
BTW is it possible to add a top padding for the button text (or a negative bottom padding)? I'm finding that the text is sitting a little high in the button: |
Thanks! The fix for this issue only fixed range selector and map navigation buttons. So we should probably dig a bit deeper to try to cover all kinds of buttons. Regarding offsetting the text, there is currently no API option for it, but CSS transform seems to work fine: https://jsfiddle.net/highcharts/eLkfz40w/ |
Behaviour
If states are used in buttonTheme I get a warning in the console:
Highcharts warning: Invalid attribute 'states' in config
Live demo with steps to reproduce
https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/stock/rangeselector/styling/
or
https://api.highcharts.com/highcharts/chart.resetZoomButton.theme
Steps: zoom to show the button -> warning
Product version
v9.0.0+
Workaround
Ignore it - everything works fine anyway.
Internal notes
states
end up innormalState
(from the theme), but could be safely deleted before runningAST.filterUserAttributes(normalState)
becausenormalState
is already a copy andstates
are provided toSVGRenderer.prototype.button
as arguments and later used from themThe text was updated successfully, but these errors were encountered: