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

chart.update could lead to fontFamily or fontSize reset to defaults #16153

Closed
trimeyko opened this issue Aug 5, 2021 · 0 comments · Fixed by #16154
Closed

chart.update could lead to fontFamily or fontSize reset to defaults #16153

trimeyko opened this issue Aug 5, 2021 · 0 comments · Fixed by #16154
Assignees

Comments

@trimeyko
Copy link

trimeyko commented Aug 5, 2021

Expected behaviour

After calling chart.update correct values should be applied.

Actual behaviour

Currently if user calls chart.update with styles which is equal to current cleanRecursively call removes these values in chart.update and we lost these values, as a consequence fontFamily or fontSize could reset to defaults because they are hardcoded in getStyle method:

fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif'
fontSize: '12px'

ts/Core/Chart/Chart.ts - update()
ts/Core/Renderer/SVG/SVGRenderer.ts - getStyle()

Live demo with steps to reproduce

https://jsfiddle.net/g3p4ve6b/1/

Product version

Highcharts JS v9.1.2

Affected browser(s)

All

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

Successfully merging a pull request may close this issue.

3 participants