RemarkLima
RemarkLima

Reputation: 12047

JQSuite JQGrid XDate displays as a long integer

I'm using the ASP.NET Webforms version of JQSuite with JQChart as part of it.

My charts are all being populated from codebehind and so far are working as expected, however I've followed the example here: http://www.trirand.net/examples/chart/line/timedateirregularintervals/default.aspx to use the XDate property.

In code behind this wants a DateTime? value, which is no problem, as I just parse the date from my SQL server into a datetime using DateTime.Parse - however as an example:

2013-11-18 displays as 1384732800000

How do I get it to display as 2013-11-18, or 18-11-2013?

I found this: Displaying Dates Correctly for JQSuite JQChart but doesn't really answer it given I'm passing a valid DateTime type to the ChartPoint object.

Upvotes: 0

Views: 114

Answers (1)

RemarkLima
RemarkLima

Reputation: 12047

Ah, *slaps forehead* so simple

ChartXAxisSettings x = new ChartXAxisSettings();
x.Type = ChartAxisType.DateTime;

Upvotes: 0

Related Questions