Feat: Doughnut chart react on datas
This commit is contained in:
@@ -25,3 +25,8 @@ function strContains (string, words, invert) {
|
||||
}
|
||||
}
|
||||
|
||||
export function total (row, field='Montant') {
|
||||
var sum = row.map(x => parseFloat(x[field]))
|
||||
.reduce((sum, x) => sum + x, 0)
|
||||
return Math.round(sum)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user