function arc(outerRadius, innerRadius, start, end, color, opacity = 1, style) {
let arc = d3.arc()
.innerRadius(innerRadius)
.outerRadius(outerRadius)
.startAngle(([startAngle, endAngle]) => startAngle)
.endAngle(([startAngle, endAngle]) => endAngle)
let startAngle, endAngle
if (style === 'tacho') {
startAngle = Math.PI*start/100 - Math.PI/2
endAngle = Math.PI*end/100 - Math.PI/2
} else {
startAngle = 2*Math.PI*start/100
endAngle = 2*Math.PI*end/100
}
return svg`<path opacity="${opacity}" stroke="none" fill="${color}" d="${arc([startAngle, endAngle])}"></path>`
}