Can i add the percentage symbol to my sf chart?

Hi Syncfusion.

Is it possible to add the '%' symbol to my syncfusion area graph.

This is how it currently looks.  I want to add the '%' symbol after each value that is plotted.



Attachment: sync_7abfb37.zip

1 Reply

DD Devakumar Dhanapoosanam Syncfusion Team March 23, 2020 06:42 AM UTC

Hi Topsy K, 
 
Greetings from Syncfusion. 
 
We have analyzed your requirement and it can be achieved using the ChartDataMarker LabelStyle LabelFormat property as per in the below code snippet, 
 
XAML: 
<chart:AreaSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"> 
        <chart:AreaSeries.DataMarker> 
                <chart:ChartDataMarker> 
                    <chart:ChartDataMarker.LabelStyle> 
                        <chart:DataMarkerLabelStyle LabelFormat="#.#'%'"/> 
                    </chart:ChartDataMarker.LabelStyle> 
                </chart:ChartDataMarker> 
        </chart:AreaSeries.DataMarker> 
</chart:AreaSeries> 
 
Please refer the below chart sample for reference, 
 
 
(OR) 
 
If your requirement is to show the percentage value for the corresponding YValue, then you can use the ChartDataMarker LabelContent property as Percentage as per in the below code snippet, 
 
XAML: 
<chart:AreaSeries> 
            <chart:AreaSeries.DataMarker> 
                <chart:ChartDataMarker LabelContent="Percentage"/> 
            </chart:AreaSeries.DataMarker> 
</chart:AreaSeries> 
 
Please refer the below help document for more details, 
 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Devakumar D 


Loader.
Up arrow icon