0👍
✅
The sort function is currently using the sum:
.sort((a,b) => b.sum - a.sum)
So replace that with the data you want sorted:
.sort((a,b) => b.data[i] - a.data[i])
Where i
is the row you desire.
Source:stackexchange.com