Chart.js axes label font size

前端 未结 5 1166
天命终不由人
天命终不由人 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 01:57

    Try to see if this will work

    {
      ...
      scales: {
        xAxes: [{
          fontSize: 40
          ...
        }]
       }
    }
    

    It doesn't look like scaleFontSize is a valid property.

提交回复
热议问题