Chartjs-Limit data points with chart js

1πŸ‘

βœ…

To solve your problem you will need to select data points with 4 points skipped manually.
Here is the code example to have you get the idea.

var reducedDataPoints = []
for(let [item, index] of xAxisDataPoints.entries()) {
  if(index % 5 === 0) {
    reducedDataPoints.push(item)
  }
}

You also need to do the same on the y axis to get it to work. Hope it helps

Leave a comment