ChartJS Only Show Large Font Size for a Specific Tick

前端 未结 2 1749
有刺的猬
有刺的猬 2021-01-28 10:00

I am attempting to emphasize a specific value on the X-Axis if it meets a specific condition.

For example, in my codepen I want to only change the font size of the \'blu

2条回答
  •  太阳男子
    2021-01-28 10:36

    Looks like it's not possible according to their docs. You can only do something like uppercase needed label with callback function

    xAxes: [{
      ticks: {
        fontSize: 16,
        callback: v => v === 'Blue' ? v.toUpperCase() : v
      }
    }]
    

提交回复
热议问题