mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 03:00:04 -03:30
use math.floor to calc % pie slices
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user