Home Forums Chart Support Theme font size and option font size work differently

Theme font size and option font size work differently

Viewing 2 posts - 1 through 2 (of 2 total)
  • #42425

    Hello,

    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.

    https://jsfiddle.net/7wyu3c8v/4/

    I haven’t found docs for it so if its not supported, any tricks to make it work or suggestion for the use case?

    #42431

    @elcollie,

    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.


    Thangaraj Raman
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.