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

SFChart control with Labels to right of chart


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" />

1 Reply

MP Michael Prabhu M Syncfusion Team 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 



Live Chat Icon For mobile
Up arrow icon