Swift: Inner tittle Shinobi Donut Charts


I need to make a center text or title inside Donut chart.

I searching for a couple hour about title inside donut chart but there are still little about documentation and question about that. I found a library in here . That can make a center title for donut chart, i like to know can Donut charts shinobi do this? Or there are any article or anything regarding about this? Any answer and suggest will help for me. Thanks in Advance


Hi MrX,

You can center the donut chart’s title on the chart as follows:

First, add this line when setting up the chart:

chart.overlapChartTitle = true

This ensures no space is left at the top of the chart for the title.

Then add the following SChartDelegate method:

func sChartRenderFinished(_ chart: ShinobiChart) {
    chart.titleLabel.center = chart.canvas.center

I hope that helps!