Is it possible to put the caption of the doughnut chart in the center of the chart?
Hi Josh,
Thanks for using Syncfusion product.
We have analyzed this.
This cannot be done directly, but can be achieved as an work
around.
The below code snippet shows a method which is triggered on
animationComplete of chart.
[JS]
function complete(sender){ //
triggered on animation complete
if($("#template1").length==0){
var template = $("<span>Project
Cost Breakdown</span>").attr('id', "template1"); //create span tag
$(template).appendTo("#chartContainer_container"); //append it to container
}
var template = "#template1";
var textWidth = $(template).width(); // get span width
var textHeight = $(template).height(); //get span height
$(template).css({"position": "absolute",
// apply css
"marginLeft": sender.model.m_AreaBounds.Width/2 - textWidth/4,
"marginTop":
sender.model.m_AreaBounds.Height/2 + textHeight/2,
"display" : "block"
});
}
We have also prepared a sample to illustrate this.
Link: http://www.syncfusion.com/downloads/support/directtrac/131552/doughnut613125429.zip
Please let us know if you have any concern.
Thanks,
Jayavigneshwaran