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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SFChart control with Labels to right of chart

Thread ID:





140981 Nov 16,2018 05:31 PM UTC Nov 21,2018 10:23 AM UTC Xamarin.Forms 1
Tags: SfChart
Dylan Wegner
Asked On November 16, 2018 05:31 PM UTC


I am working with the SFChart and I am looking to create a chart that looks like the following: 

Currently the value and label to the right of the chart are in a list view and not part of the actual chart. Because of this the alignment is all off as you can see. I am wondering if there is a way to get the labels to the right out of the list view and be a piece of the actual chart. Perhaps using Data Markers? Any help would be appreciated. I have included the code and list view below for reference. 

 <Grid VerticalOptions="Start">
                    <ColumnDefinition Width="4*" />
                    <ColumnDefinition Width="*" />
                <!--Chart (SyncFusion) -->
                <chart:SfChart HorizontalOptions="FillAndExpand"
                    <!--Trait Name Axus-->
                        <chart:CategoryAxis ShowMajorGridLines="True"
                                            LabelPlacement="BetweenTicks" />
                    <!--Trait Value Axis-->
                        <chart:NumericalAxis Minimum="-2"
                        <!--Bar Chart-->
                        <chart:BarSeries x:Name="ConformationBarChart"
                                         ItemsSource="{Binding ChartData}"
                                         Color="{StaticResource AppColorPrimaryLight}"

                <ListView Grid.Column="1"
                          ItemsSource="{Binding ChartDataValuesAndDescriptors, Mode=TwoWay}"
                          Margin="{Binding Converter={StaticResource ConformationListViewMarginConverter}}"
                                <Grid ColumnSpacing="0">
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />

                                    <Label Text="{Binding TraitValue, Mode=TwoWay}"
                                           FontAttributes="Bold" />

                                    <Label Text="{Binding TraitValueText, Mode=TwoWay}"
                                           VerticalOptions="Start" />

Michael Prabhu M [Syncfusion]
Replied On November 21, 2018 10:23 AM UTC

Hi Dylan, 

Greetings from Syncfusion. We have achieved your requirement as a work around by adding another series and setting a CategoryAxis to series X-axis and setting transparent color to that series. Please refer below code snippet. 

Code snippet [XAML]:   
                <chart:BarSeries x:Name="column" ItemsSource="{Binding Data}" XBindingPath="XValue1" YBindingPath="YValue" > 
                <chart:BarSeries x:Name="column1" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue" Color="Transparent" EnableTooltip="False" ShowTrackballInfo="False" > 
                        <chart:CategoryAxis Interval="1" OpposedPosition="True" IsInversed="True" LabelPlacement="BetweenTicks" LabelCreated="CategoryAxis_LabelCreated" /> 

And we have prepared a sample for your requirement and you can download the sample from the below link. 

Sample: 220990 




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon