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.
Syncfusion Feedback

AddBreaks PrimaryXAxis by Date

Thread ID:

Created:

Updated:

Platform:

Replies:

99552 May 26,2011 10:41 PM UTC May 30,2011 10:09 AM UTC ASP.NET Web Forms (Classic) 3
loading
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...


Eric


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.

[C#]
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.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=Chart1038386969.zip

Please let us know if any concerns.

Regards,
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?

Eric


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.

Regards,
SivaKumar D


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

;