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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Is it possible to bind XBindingPath="{Binding Key, StringFormat='{0:MMM yyyy}'}" in SfChart Series

Thread ID:





132431 Sep 1,2017 06:19 AM UTC Sep 7,2017 06:31 AM UTC Xamarin.Forms 3
Tags: SfChart
Balamuraleekrishna K R
Asked On September 1, 2017 06:19 AM UTC

Is it possible to bind XBindingPath="{Binding Key, StringFormat='{0:MMM yyyy}'}" in

                            <chart:SplineSeries x:Name="splineSalesGraph"
                                                ItemsSource="{Binding MonthWiseSummaryList}" 
                                                EnableAnimation="True" EnableTooltip="False">

where Key is a property in :

namespace System.Collections.Generic
     public struct KeyValuePair<TKey, TValue>
          public KeyValuePair(TKey key, TValue value);

          public TKey Key { get; }
          public TValue Value { get; }
          public override string ToString();

in ViewModel : 

            MonthWiseSummaryList = new List<KeyValuePair<DateTime, double>>();
            MonthWiseSummaryList.Add(new KeyValuePair<DateTime, double>(new DateTime(2017, 03, 01), 383884.00));

Parthiban Sundaram [Syncfusion]
Replied On September 4, 2017 10:43 AM UTC

Hi Balamuraleekrishna,

Thanks for using Syncfusion products.

You can achieve your requirement by using LabelStyle.LabelFormat propertyof DateTimeAxis. Please find the below code snippet.

Code Snippet:

            <chart:ChartAxisLabelStyle LabelFormat="MMM yyyy"/> 

Sample: http://www.syncfusion.com/downloads/support/forum/132431/ze/LabelStyle-1150041112

Please let us know, if you need further assistance on this.

Parthiban S

Balamuraleekrishna K R
Replied On September 6, 2017 05:38 AM UTC

Thank you sir..... Really helpful.

Parthiban Sundaram [Syncfusion]
Replied On September 7, 2017 06:31 AM UTC

Hi Balamuraleekrishana,

Thanks for the update. We are glad that the given solution has helped to achieve your requirement. Please let us know for your further assistance.

Parthiban S


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