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

Binding ChartStripLine.SegmentStartValue and SegmentEndValue to DateTime instead of a double

Thread ID:





111035 Sep 4,2013 05:16 PM Sep 6,2013 01:40 AM WPF 1
Tags: Chart
Asked On September 4, 2013 05:16 PM

Hello, I have an SfChart representing some data, for which the X axis is a DateTime value (say it shows the days from a Monday August 1st to Sunday August 7th). Now, I want to add a strip line from the 3rd (Wednesday) to the 6th (Saturday), but as far as I can tell, I can't bind to DateTimes. Am I doing something wrong? Here's what I have. Thank you.

<chart:ChartStripLine Background="Red"
                        SegmentStartValue="{Binding StartTime}"
                        SegmentEndValue="{Binding EndTime}">
            <TextBlock Text="{Binding}" />

Muneesh Kumar G [Syncfusion]
Replied On September 6, 2013 01:40 AM

Hi Carlo,


Thanks for using Syncfusion products.


We have analyzed your query. We would like to inform you that SegmentStartValue and SegmentEndValue properties types are double. So we need to give only double values for these properties. And we have to set IsSegmented property value as true to make ChartStripline segments, visible as per below code snippet.


Code Snippet[XAML]:


<syncfusion:ChartStripLine IsSegmented="True" SegmentEndValue="33" SegmentStartValue="15" Start="2" StartFromAxis="False" Width="413"></syncfusion:ChartStripLine>



We have prepared a sample based on this. Please find the sample from the following location.


Please let us know if you have any queries.



Muneesh Kumar G.



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.

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.