Hide min and max values from y Axis in Chart.js

前端 未结 3 2088
伪装坚强ぢ
伪装坚强ぢ 2021-02-08 22:37

I have assigned the min and max of Y axes with the tick configuration.But I do not want these min max values to be shown in the graph.I need to hide these values at both the end

3条回答
  •  走了就别回头了
    2021-02-08 23:13

    Hiding the max worked this way for me (ng2-charts): I return undefined instead of value to hides tick's value & line

    scales: {
          xAxes: [{
            ticks: {
              callback: (value, index, values) => (index == (values.length-1)) ? undefined : value,
            },
    

    ...

提交回复
热议问题