You must be logged in to post your query.
Home › Forums › Chart Support › Theme font size and option font size work differently
We are trying to use themes to provide global default options for ChartJS but it looks like some options are not working the same way when setting it in chart.options and setting it through themeOptions.
For example when setting the axisY.labelFontSize in themeOptions the rendered font size is different compared to using chart.options.axisY.
Also, when zooming in or out the rendered font size (in themeOptions way) stays the same as opposed to chart.options.axisY where the font get smaller.
I haven’t found docs for it so if its not supported, any tricks to make it work or suggestion for the use case?
You seem to be using undocumented methods and properties. addTheme is an internal property with certain functionality and might not apply font-size as defined across all the elements in the chart. We suggest you use chart.options to set the labelFontSize in this case since it will apply the font-size based on the defined value.
You must be logged in to reply to this topic. Login/Register