async function drawDonutSpecific(url) {
d3.select("#chartPerCharacter").select('svg').remove()
var svg = d3.select("#chartPerCharacter")
.append("svg")
.attr("viewBox", [0, 0, dimensions.width, dimensions.height])
.append("g")
.attr("transform", "translate(" + dimensions.width / 2 + "," + dimensions.height / 2 + ")");
let data = dataPerCharacter[url]
var pie = d3.pie()
.sort(null)
.value(function(d) {return d.value; })
var data_ready = pie(d3.entries(data))
var arc = d3.arc()
.innerRadius(radius * 0.6)
.outerRadius(radius * 0.9)
const photoImgWidth = 100
svg
.selectAll('allSlices')
.data(data_ready)
.enter()
.append('path')
.attr('d', arc)
.attr('fill', function(d){ return(color(d.data.key)) })
.attr("stroke", "white")
.style("stroke-width", "2px")
.style("opacity", 1)
.style('cursor', 'pointer')
.on('mouseenter', function(d) {
svg.selectAll('path').filter(p => p.data.key !== d.data.key).style('opacity', 0.2);
const label = svg.append('text')
.datum(d)
.style('font-size', width/ 20)
.attr("fill", "#888")
.attr('data-id', d => d.data.key)
.attr('text-anchor', 'middle')
.attr('y', radius * 0.3)
.text(d => d.data.value + ' POV' + (d.data.value === 1 ? '': 's') + ' from ')
.attr('opacity',1);
svg.append('text')
.datum(d)
.style('font-size', width/ 20)
.attr("fill", "#888")
.attr('data-id', d => d.data.key)
.attr('text-anchor', 'middle')
.attr('y', radius * 0.4)
.text(d => d.data.key)
.attr('opacity',1);
})
.on('mouseout', function(d) {
svg.selectAll(`text[data-id="${d.data.key}"]`).remove();
svg.selectAll('path').style('opacity', 1);
})
const image = svg.selectAll('image')
.data([url])
.join("image")
.attr('data-id', d => d)
.attr('height', function(d) {
return width * 0.3
})
.attr("x", d => -getWidth(d) / 2)
.attr("y", -width * 0.20)
.attr("xlink:href", d => d)
.attr('opacity',1)
}