admin: fix camembert size overflow

This commit is contained in:
nemunaire 2017-12-17 20:46:11 +01:00
parent ba88129580
commit baf992bccb

View File

@ -974,7 +974,7 @@ angular.module("FICApp")
}); });
function solvedByLevelPie(location, data) { function solvedByLevelPie(location, data) {
var width = d3.select(location).node().getBoundingClientRect().width - 10, var width = d3.select(location).node().getBoundingClientRect().width - parseInt(d3.select(location).style("padding-right")) - parseInt(d3.select(location).style("padding-left")),
height = d3.select(location).node().getBoundingClientRect().width - 10, height = d3.select(location).node().getBoundingClientRect().width - 10,
radius = Math.min(width, height) / 2, radius = Math.min(width, height) / 2,
innerRadius = 0.1 * radius; innerRadius = 0.1 * radius;
@ -1045,7 +1045,7 @@ function solvedByLevelPie(location, data) {
} }
function solvedByThemesPie(location, data) { function solvedByThemesPie(location, data) {
var width = d3.select(location).node().getBoundingClientRect().width, var width = d3.select(location).node().getBoundingClientRect().width - parseInt(d3.select(location).style("padding-right")) - parseInt(d3.select(location).style("padding-left")),
height = d3.select(location).node().getBoundingClientRect().width, height = d3.select(location).node().getBoundingClientRect().width,
radius = Math.min(width, height) / 2, radius = Math.min(width, height) / 2,
innerRadius = 0.1 * radius; innerRadius = 0.1 * radius;