Chart.js axes label font size

前端 未结 5 1164
天命终不由人
天命终不由人 2021-02-01 01:20

In chart.js how can I set the set the font size for just the x axis labels without touching global config?

I\'ve already tried setting the \'scaleFontSize\' option my op

5条回答
  •  抹茶落季
    2021-02-01 02:02

    Try this simple solution:

    myChart.options.scales.yAxes[0].ticks.fontSize = 40 ;
    
    myChart.update();
    

提交回复
热议问题