total headcount cannot be shown on the center of the Doughnut chart

Hi Syncfucion support,

If you look at below screenshots, the total headcount cannot appear on the center of the Doughnut chart.

Appreciate your help if you can guide how to make the total headcount appear on the center of the Doughnut chart.

Thanks & Best Regards





1 Reply

DD Devakumar Dhanapoosanam Syncfusion Team September 13, 2022 05:46 AM UTC

Hi Jake,


We would like to let you know that the BindingContext for the CenterView will be the corresponding DoughnutSeries. We can bind the ViewModel property to CenterView, by using the BindingContext.PropertyName as per in the below code example.


<chart:DoughnutSeries.CenterView>

    <Grid>

        <Label Text="{Binding BindingContext.SumValue}"

               FontAttributes="Bold" HorizontalTextAlignment="Center"/>

    </Grid>

</chart:DoughnutSeries.CenterView>


UG: https://help.syncfusion.com/xamarin/charts/charttypes#add-view-to-the-center-of-doughnut-chart


Please refer the below GitHub example sample code for more details:

https://github.com/syncfusion/xamarin-demos/tree/master/Forms/Chart/Chart/Samples/DoughnutChart


Please check and let us know if you need any further assistance.


Regards,

Devakumar D


If this post is helpful, please consider accepting it as the solution so that other members can locate it more quickly.


Loader.
Up arrow icon