use math.floor to calc % pie slices

This commit is contained in:
Leigh Johnson
2016-05-26 11:05:02 -04:00
parent de99df4b20
commit 3bb1ac14ea

View File

@@ -979,7 +979,7 @@ export default
job_detail_chart = nv.models.pieChart() job_detail_chart = nv.models.pieChart()
.margin({bottom: 15}) .margin({bottom: 15})
.x(function(d) { .x(function(d) {
return d.label +': '+ Math.round((d.value/total)*100) + "%"; return d.label +': '+ Math.floor((d.value/total)*100) + "%";
}) })
.y(function(d) { return d.value; }) .y(function(d) { return d.value; })
.showLabels(false) .showLabels(false)