Not able to create data labels with connector lines in circular chart

I am trying to put data labels for a circular chart as shown on page https://help.syncfusion.com/flutter/chart/marker-datalabel, I am not able to create data labels with connector lines. The data I want to put in the labels is of type string and I want to be outside the chart at some distance. Can you attach a sample project which has the described functionality?

3 Replies

DD Dharanidharan Dharmasivam Syncfusion Team March 1, 2020 10:49 AM UTC

Hi Yudhisthir, 
 
Greetings from Syncfusion. We have analyzed your query. When the data label is enabled for the circular chart widget, then the data label will be visible inside the circular chart slices and by default, y-value will be displayed.  
 
The data labels can be positioned outside the slices using the labelPosition property of the series and the data labels are positioned with the connector lines if positioned outside. More information on the connector line can be found using the below user guide. 
 
To use the custom values in the data label, use the dataLabelMapper property of the series to map the values from your data source. Find the code snippet below to achieve the above requirements. 
 
SfCircularChart( 
        series: <CircularSeries<SalesData, String>>[ 
          PieSeries<SalesData, String>( 
              dataLabelSettings: DataLabelSettings( 
                isVisible: true, 
                labelPosition: ChartDataLabelPosition.outside, 
              ), 
              // Map the values for data labels from data source 
              dataLabelMapper: (SalesData sales, _) => sales.year, 
              // Other configurations 
          ) 
        ]) 
 
 
 
The sample for reference can be found below. 
 
Thanks, 
Dharani. 



AJ Alyssa James March 18, 2020 03:54 PM UTC

heyy 
im new to Flutter, so i'm having the same problem here,
sorry for the unconvenience and thanks in advance for the help !













DD Dharanidharan Dharmasivam Syncfusion Team March 19, 2020 06:27 AM UTC

Hi Alyssa, 

Most welcome. Kindly get back to us if you have further queries. 

Thanks, 
Dharani. 


Loader.
Up arrow icon