Skip to content
Snippets Groups Projects
Commit 3ea60097 authored by moon's avatar moon
Browse files

#97: Fixed species-wise pie chart

parent c41b488e
No related branches found
No related tags found
No related merge requests found
......@@ -60,8 +60,8 @@ export default {
const filter = 10;
let d = _.filter(data, c => c.count > filter)
let etcTotal = _.reduce(_.filter(data, c => c.count < filter), (sum, n) => sum + n.count, 0);
chart.data = _.concat(d, {'_id': `ETC (≤ ${filter})`, 'total': etcTotal})
let etcTotal = _.reduce(_.filter(data, c => c.count <= filter), (sum, n) => sum + n.count, 0);
chart.data = _.concat(d, {'_id': `Others (≤ ${filter})`, 'count': etcTotal})
// chart.data = _.orderBy(data, ['total'], ['desc']);
const pieSeries = chart.series.push(new am4charts.PieSeries3D());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment