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

Vertical StripLines on a DateTimeAxis

Thread ID:

Created:

Updated:

Platform:

Replies:

130611 May 21,2017 03:08 PM UTC May 22,2017 11:30 AM UTC WPF 1
loading
Tags: SfChart
RR
Asked On May 21, 2017 03:08 PM UTC

Is it possible? I can't figure out what start and width properties would be set to. 

Durgadevi Selvaraj [Syncfusion]
Replied On May 22, 2017 11:30 AM UTC

Hi Rosanne,

Thanks for contacting Syncfusion Support.

We would like to inform you that, it is possible to set ChartStripline to the DateTimeAxis by converting the corresponding datetime value to the
double value as like in the below code snippet,
 
DateTimeAxis datetimeaxis = new DateTimeAxis(); 
datetimeaxis.LabelFormat = "MMM"; 
chart.PrimaryAxis = datetimeaxis;  
 
ChartStripLine stripline = new ChartStripLine(); 
stripline.Start = new DateTime(2010, 04, 01).ToOADate(); 
stripline.Width = 91; 
stripline.Background = new SolidColorBrush(Colors.LightBlue); 
stripline.Opacity = 0.8; 
stripline.Label = "Quarter 2"; 
datetimeaxis.StripLines.Add(stripline); 
 
 













  
  
  
  
  
  
Please find the output screenshot, 

We have prepared a demo sample for your reference and it can be downloaded from below link,
Sample: VerticalStripLine_DateTimeAxis

Regards,

Durgadevi S 




CONFIRMATION

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.

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

;