1👍
Okay I found it, I used sort method, and grabbed the id of it
const list = res.data.sort((a, b) => {
return a._id - b._id
})
list.map((item) =>
setUserStats((prev) => [
...prev,
{ name: MONTHS[item._id - 1], 'Active User': item.total },
])
- [Chartjs]-Can individual bubbles in a chartjs bubble chart have labels?
- [Chartjs]-Chart.js – disable tooltip when cursor moves outside the main canvas
Source:stackexchange.com