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

Adjuste TimeInterval / Line stroke on plain hour

Thread ID:

Created:

Updated:

Platform:

Replies:

114691 Dec 4,2013 12:17 PM UTC Dec 18,2013 05:06 AM UTC Windows Forms 7
loading
Tags: Chart
Rodolphe Billottet
Asked On December 4, 2013 12:17 PM UTC

Hi,

I need to display kind of financial market indicator along the day. I want to have the line stoke positionned on every hour (8:00, 9:00, 10:00 ...  )  I have set the DateTimeInterval as follow to have 1hour interval:

..PrimaryAxis.DateTimeInterval = new TimeSpan(1, 0, 0);

..PrimaryAxis.MinimumDateTimeInterval = new TimeSpan(1, 0, 0);

..PrimaryAxis.IsAutoSetRange = true;

For a normal day, the series start at 8:50 and stop at 15:35. So by default the chart should start at 8:00, finish at 16:00 and have line every hour 8:00, 9:00, 10:00 ... 14:00, 15:00, 16:00

Regurarly, for some mysterious reason, all the line are shift one minute before each hour and I have the line on 7:59 , 8:59, 9:59 .... 13:59, 14:59, 15:59    and usually, it is not stable and changes all along the day  (7:59  => 8:00 => 7:59 ... ).

Ideally I want to optimize the display, having the chart started at the first point of the serie and finish on the last point of the serie. So I have use this potion.

...Areas[0].PrimaryAxis.RangePadding = ChartRangePaddingType.Normal;

And now, as series start at 8:50 and stop at 15:35, I have all the lines shift (8:50,  9:50, 10:50 ... 14:50, 15:35).

So the question is simple how to set the line plain hour in any case  (I want 8:00  not 7:59)

I have attache some screenshot. I will try to attach a sample.


(using 11.3.0.30)



chartesnap_ff4e2eb.zip

Rodolphe Billottet
Replied On December 6, 2013 12:28 AM UTC

I did a sample (using one from Syncfusion 9.3.0.61 Samples). It uses some static data loaded from file.

It is just a simple one serie chart with a "Reload" button, which delete a re-create the serie with the same data.

We can see that the display of the time axis is not stable. 
Time labels are contiously changing from  HH:00  to HH:59  when I click the reload button.

It looks like a bug. Please advice..

 



MySample_57e79326.zip

Rodolphe Billottet
Replied On December 6, 2013 09:51 AM UTC

BTW, this is a WPF issue. I posted it in the wrong place


Muneesh Kumar G [Syncfusion]
Replied On December 7, 2013 05:56 AM UTC

Hi Thierry,

Thanks for using Syncfusion products.

We have analyzed your requirement and modified your sample based on that. Please find the sample from the following location.

Please let us know if you have any queries.

Regards,

Muneesh Kumar G.



MySample_345f2719.zip

Rodolphe Billottet
Replied On December 9, 2013 05:12 AM UTC

I thanks for the reply with the code

Just you should use code which are not culture dependant. When, I have opened the sceen, the label issue was solve but there was no chart is the screen...  I had to change the date format (2013/5/12 => 2013/12/5)  to get the data back.

You set AutoSetRange = false and you fixed the DateTimeRange but actually, my screen display real time data which are updated all the day. So I want to keep the 'AutoSetRange'.

Do you have a solution with  the 'AutoSetRange' enabled ?

Or do I need disable 'AutoSetRange' and continously update the 'DateTimeRange' ?

 

Also I want the chart start 8:30 and having the first line at 9:00  and every hour. How can I do that.

I think there is a DateTimeOffset property to solve that basic issue in WinForm version. Where is that property in WPF.  Is it gone ?


Muneesh Kumar G [Syncfusion]
Replied On December 10, 2013 07:29 AM UTC

Hi Rodolphe,

Thanks for the update.

As per your requirement we have modified your sample. Please find the modified sample from the following location.

Please let us know if you have any queries.

Regards,

Muneesh Kumar G.



MySample_c2452411.zip

Rodolphe Billottet
Replied On December 16, 2013 05:34 AM UTC

Hi Muneesh,

Thanks for your update.

Unfortunately, I think there is a misunderstood on the requirement.

In your sample, the range is fixed, the chart is moving backward, and x-axis line are changing every 5 min

My initial requirement is to have the X-axis lines set on every hour (9:00  10:00 11:00  ... ) and I want an Automatic range..

Anyway, I will create a new post in the good section (WPF), reexplain the requirement, a give a new sample...

 

Thanks

Rodolphe


Muneesh Kumar G [Syncfusion]
Replied On December 18, 2013 05:06 AM UTC

Hi Rodolphe,

Thank you for your update.

As said we will continue assisting you with the below forum. Please follow up this below link for further updates.

Link: http://www.syncfusion.com/support/forums/general/114944

Regards,
Muneesh Kumar G.


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

;