Im trying to create a chart which looks like the charts below.
So far i managed to get the value displayed in the center with the doughnut chart but not an arc like chart. Here is my code
Chart.pluginService.register({
beforeDraw: function(chart) {
var width = chart.chart.width,
height = chart.chart.height,
ctx = chart.chart.ctx
ctx.restore()
var fontSize = (height / 114).toFixed(2)
ctx.font = fontSize + 'em sans-serif'
ctx.textBaseline = 'middle'
var text = chart.config.data.text,
textX = Math.round((width - ctx.measureText(text).width) / 2),
textY = height / 2
ctx.fillText(text, textX, textY)
ctx.save()
},
})
Any idea on how to achieve this?

