mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Added pie slice by time, good job arturo. Thanks arturo.
This commit is contained in:
parent
8383552a1f
commit
ed195ff909
@ -1332,7 +1332,7 @@ function print_phases_donut (recipient, phases) {
|
|||||||
var svg = d3.select(recipient)
|
var svg = d3.select(recipient)
|
||||||
.append("svg")
|
.append("svg")
|
||||||
.attr("width", 500)
|
.attr("width", 500)
|
||||||
.attr("height", 200)
|
.attr("height", 300)
|
||||||
.append("g");
|
.append("g");
|
||||||
|
|
||||||
svg.append("g")
|
svg.append("g")
|
||||||
@ -1343,13 +1343,13 @@ function print_phases_donut (recipient, phases) {
|
|||||||
.attr("class", "lines");
|
.attr("class", "lines");
|
||||||
|
|
||||||
var width = 500,
|
var width = 500,
|
||||||
height = 200,
|
height = 300,
|
||||||
radius = Math.min(width, height) / 2;
|
radius = Math.min(width, height) / 2;
|
||||||
|
|
||||||
var pie = d3.layout.pie()
|
var pie = d3.layout.pie()
|
||||||
.sort(null)
|
.sort(null)
|
||||||
.value(function(d) {
|
.value(function(d) {
|
||||||
return 1;
|
return parseFloat(d.label2);
|
||||||
});
|
});
|
||||||
|
|
||||||
var arc = d3.svg.arc()
|
var arc = d3.svg.arc()
|
||||||
@ -1375,7 +1375,7 @@ function print_phases_donut (recipient, phases) {
|
|||||||
return phase.phase_name;
|
return phase.phase_name;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return phase.phase_time + "ms";
|
return phase.phase_time;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1429,7 +1429,7 @@ function print_phases_donut (recipient, phases) {
|
|||||||
.attr("dy", "1.4em")
|
.attr("dy", "1.4em")
|
||||||
.attr("dx", "-6em")
|
.attr("dx", "-6em")
|
||||||
.text(function(d) {
|
.text(function(d) {
|
||||||
return d.data.label2;
|
return d.data.label2 + "ms";
|
||||||
})
|
})
|
||||||
.style("font-family", "Verdana")
|
.style("font-family", "Verdana")
|
||||||
.style("font-size", "10px");
|
.style("font-size", "10px");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user