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

AddBreaks PrimaryXAxis by Date

Thread ID:





99552 May 26,2011 10:41 PM UTC May 30,2011 10:09 AM UTC ASP.NET Web Forms (Classic) 3
Tags: Chart
Eric Robishaw
Asked On May 26, 2011 10:41 PM UTC

Given a chart with a PrimaryXAxis which is date oriented...

I want to add breaks every day/date boundary.
The AddBreak() method only takes a double value...

How would I convert the appropriate date into double values?

I can use a stripline for dates, but I really like the look of the breaks...


Sivakumar D [Syncfusion]
Replied On May 27, 2011 10:58 AM UTC

Hi Eric,

Thanks for using Syncfusion products.

We can convert the date object to double value in AddBreak method by using ToOADate() method of datetime object.please refer below code snippet.

DateTime start = new DateTime(2011, 5, 27);
this.ChartWebControl1.PrimaryXAxis.AddBreak(start.ToOADate(), start.AddDays(4).ToOADate());

We have prepared a simple sample and the same can be downloaded from the following link.


Please let us know if any concerns.

Siva Kumar D

Eric Robishaw
Replied On May 27, 2011 04:19 PM UTC

Thanks that's a start.

However, it appears that breaks are not visible when you zoom in.

Is that by design?


Sivakumar D [Syncfusion]
Replied On May 30, 2011 10:09 AM UTC

Hi Eric,

Thanks for your patience.

We have analyzed your requirement and found that if we set the break and while zooming, the break will not be visible which is the default behavior of in our current implementation.

Please let me know if you have any other questions or concerns.

SivaKumar D


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