如何使用Vue.js自定义Chart.js中的Y轴标签?

如何使用Vue.js自定义Chart.js中的Y轴标签?,vue.js,charts,echarts,vue-chartjs,Vue.js,Charts,Echarts,Vue Chartjs,我在Stackoverflow中看到了许多解决方案,但没有人解决我的问题 我想更改y轴值的比例 会的 0 100 200 三百 我的代码: yAxis: [{ type: 'value', axisTick: { show: false }, scales: { yAxes: [{ ticks: { begi

我在Stackoverflow中看到了许多解决方案,但没有人解决我的问题

我想更改y轴值的比例

会的

0 100 200 三百

我的代码:

yAxis: [{
          type: 'value',
          axisTick: {
            show: false
          },
          scales: {
            yAxes: [{
              ticks: {
                beginAtZero: true,
                stepSize: 100,
                min: 0,
                max: 300
              }
            }]
          },
          axisLabel: {//},
        }],
        series: [{
          //
          lineStyle: {//},
          areaStyle: {
            normal: {
              //
          },
     itemStyle: {
       normal: {
         //
    }
  },
  data: [236, 0]
}]
我也改变了这一点

axisTick: {
    show: false
}
请使用将您的设置与示例的工作设置进行比较

var options = {
  type: 'line',
  data: {
    labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
    datasets: [
            {
                label: '# of Points',
                data: [236, 0],
                borderWidth: 1
            }
        ]
  },
  options: {
    scales: {
        yAxes: [{
        ticks: {
          min: 0,
          max: 300,
          stepSize: 100,
          reverse: false,
          beginAtZero: true
        }
      }]
    }
  }
}

要自定义LEBEL,您可以使用这个
var chart=new chart(ctx,{type:'line',data:data,options:{scales:{yAxes:[{ticks:{min:0,max:300,stepSize:100,reverse:false,callback:function(value,index,values){return'$'+value;}]}