Skip to content

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

@trimeyko

Description

@trimeyko

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions