I have to show 8 labels on x-axis from 10 or more data from response. I am using Line chart Chart.js

31 Views Asked by At
 I am getting 10 data from response and need to place 8 x-axis labels. It is placing 5 labels only. I provided this on scales 
        x: {
        border: {
          color: "#655B96",
        },
        color: "red",
        offset: true,
        // borderColor: "red",
        grid: {
          drawOnChartArea: false,
          color: "#655B96",
        },
        title: {
          text: "Time",
          display: true,
        },
        ticks: {
          count: 8,
          **autoSkip: true,
          maxTicksLimit: 8,**
        },
      }

Actual graph plot from response

I want to draw 8 x-axis label in the graph. using Chart.js line graph, When more data is there maxTicksLimit is working but with less data it is not plotting 8 x-axis labels.

0

There are 0 best solutions below