We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

customization the Chart datamaker label format

Hi,
i am using piechart, my code blog is as follows. Example i get 12345.67, but i want to div decimal place like 12,345.67.
Example;
2154236321.55 => 2,154,236,321.55
How can i use label format?


          
 


4 Replies

MK Muneesh Kumar G Syncfusion Team September 19, 2019 09:46 AM UTC

Hi Mahmut Nedim, 
 
Greetings from Syncfusion. 
 
We have validated your query and you can achieve this requirement by using LabelFormat property of DataMarkerLabelStyle as per the below code snippet. 
 
Xaml: 
 
<chart:SfChart.Series> 
                    <chart:PieSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue" > 
                        <chart:PieSeries.DataMarker> 
                            <chart:ChartDataMarker > 
                                <chart:ChartDataMarker.LabelStyle> 
                                    <chart:DataMarkerLabelStyle LabelFormat="#,##0.00" />                                     
                                </chart:ChartDataMarker.LabelStyle> 
                            </chart:ChartDataMarker> 
                        </chart:PieSeries.DataMarker> 
                    </chart:PieSeries> 
</chart:SfChart.Series> 
 
 
Please let us know if you have any queries.  
      
Regards,      
Muneesh Kumar G. 
 



MN Mahmut Nedim September 19, 2019 11:09 AM UTC

Thank u very muc i have solved.
I have another problem.i am using sorting in dataGrid. but when i do sorting, i do binding the dataGrid like follows code blog. because of i refresh datagrid the up or down icon (like attached file) does not show. i tried another way but i have not succesfull. I can catch that which columnname and sortdirection.
How can i show up down icons without default sorting method?

private void DataGrid_SortColumnsChanged(object sender, Syncfusion.SfDataGrid.XForms.DataGridSortColumnsChangedEventArgs e)
{
          
      ...
      dataGrid.BindingContext = new OrderInfoRepository(req);
      ...
}

Attachment: sorting_d7a655ab.rar


MN Mahmut Nedim replied to Mahmut Nedim September 19, 2019 01:48 PM UTC

Thank u very muc i have solved.
I have another problem.i am using sorting in dataGrid. but when i do sorting, i do binding the dataGrid like follows code blog. because of i refresh datagrid the up or down icon (like attached file) does not show. i tried another way but i have not succesfull. I can catch that which columnname and sortdirection.
How can i show up down icons without default sorting method?

private void DataGrid_SortColumnsChanged(object sender, Syncfusion.SfDataGrid.XForms.DataGridSortColumnsChangedEventArgs e)
{
          
      ...
      dataGrid.BindingContext = new OrderInfoRepository(req);
      ...
}

Attachment: sorting_d7a655ab.rar

I have solved myself :)

My code row is follows under

 dataGrid.SortColumnDescriptions.Add(
                new Syncfusion.SfDataGrid.XForms.SortColumnDescription { ColumnName = (e.AddedItems[0].ColumnName, SortDirection = e.AddedItems[0].SortDirection });


FP Farjana Parveen Ayubb Syncfusion Team September 20, 2019 06:30 AM UTC

Hi Mahmut Nedim 
 
Thanks for the update. 
 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Farjana Parveen A 


Loader.
Live Chat Icon For mobile
Up arrow icon