Position Labels over Barchart bars Horizontally

Dear support, 
Please i would like your assist on placing labels of my barchart over each bar and aligned on the left. 
I've tried using the following code 

<ContentPage.Resources>
        <ResourceDictionary>            
            <DataTemplate x:Key="dataMarkerTemplate" >
                <StackLayout Orientation="Horizontal">
                    <Label Text="{Binding Type}" VerticalOptions="Center" FontSize = "12" />
                </StackLayout>
            </DataTemplate>
        </ResourceDictionary>
</ContentPage.Resources>
 <chart:BarSeries ItemsSource="{Binding ChartData_BarChartData}" XBindingPath="Type" YBindingPath="Count" Width="0.5"  Color="{Binding BarChartColor}" >
       <chart:BarSeries.DataMarker >
            <chart:ChartDataMarker ShowLabel="True" LabelTemplate="{StaticResource dataMarkerTemplate}">
                 <chart:ChartDataMarker.LabelStyle >
                      <chart:DataMarkerLabelStyle  LabelPosition="Inner" OffsetY="-20" />
                 </chart:ChartDataMarker.LabelStyle>
            </chart:ChartDataMarker>
        </chart:BarSeries.DataMarker>
</chart:BarSeries>

The result from code, the labels are not aligned to the left side of the screen


Thank you in advance

1 Reply 1 reply marked as answer

YP Yuvaraj Palanisamy Syncfusion Team March 10, 2021 01:31 PM UTC

Hi Panayiotis Mousarris, 
 
Greetings from Syncfusion. 
 
We wouldd like to inform you that the DataMarker label text has been shifted to the left of the Bar series with the help of DataMarkerPosition property of BarSeries. Please find the below code example. 
 
CodeSnippet: 
<chart:BarSeries ItemsSource="{Binding Data}" 
                 XBindingPath="XValue" 
                 YBindingPath="YValue" 
                 DataMarkerPosition="Bottom"> 
 
 
Output: 
 
 
For more details, please refer the below link. 
 
 
Please let us know if you have any concern. 
 
Regards, 
Yuvaraj. 


Marked as answer
Loader.
Up arrow icon