Jump to content
Software FX Community

Timespan on the x-axis


Sunix

Recommended Posts

Hello all.

 I have a chart where the x-axis shows some timeperiods and a number of y-axis can show different values.

I always have a dummyserie ensuring that the x-axis will span over 24 hours (from midnight to midnight) if there is no data to show. If only this dummyserie (containing 2 chartitems with the value 0.0 for each midnight) the x-axis spans from midnigh to midnight. This is how I want the chart to span.

If the actual data serie contain any data exceeding 10pm the end of the x-axis goes beyond midnight always adding 2 hours to the latest data in the data series. If the data I want to show has a value at 11.55 pm the endpoint on the x-axis will be 01.55 am the next day.

 What can be the cause of this? Can anyone help.

 

Link to comment
Share on other sites

>> About the dummy Series.

If your axis always goes from midnight to midnight you should be able to change the X axis Min and Max to force that range.

>> About the end of the X axis exceeding your max by 2 hours.

This sounds like a possible mismatch between time zones. Can you expand on how are you passing the data to the chart? Are you using DataTable? LinQ? CLR objects? XML?

Regards,

JuanC

Link to comment
Share on other sites

I don't see a need for changing the chart component.

The problem was that I gave the chart-component different datetime-types for the data vs. the datetimes specifying the min and max of the x-axis. One was in UTC and the other in local time. As long as I pass the same datetime-type for both the data to be shown and the min and max of the x-axis the chart will show the data correct.

 

Thanks

Sunix

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...