Show labels on x axis in vue-chartjs

Viewed 27

I`m struggling with the esthetic aspect of my chart. Actually it lookes like this: My Chart

Chart is showing data over time in 10mins intervals. With that number of labels it`s hard to see what column matches to time. I would like to create ticks like on the image, so the chart would be way more readable. I looked into documentatnion and tried this but without effect:

scales: {
  xAxes: [
    {
      ticks: {
        drawTicks: true,
      },
    },
  ],
1 Answers

Pasting the answer from the comment section, best way to work with ticks is by using callback function eg:



ticks: {
     callback: function (value: any, index: any, ticks: any) {               
              return 'What you want to return';             
      },           
}
Related