user3063615
user3063615

Reputation: 21

Displaying Dates Correctly for JQSuite JQChart

I'm trying to format a JQSuite JQChart to display the date correctly on the X-Axis. The select statement is returning datetime data (including milliseconds). I just want to plot the date in a format like "yy/mm/dd".

Doing something like this only displays times:

->setxAxis(array("title"=>array("text"=>"Maturity Date"), "type"=>"datetime"))

Adding this loses any labels:

"tickInterval"=> 7*24*3600*1000))

Has anybody solved this problem?

Upvotes: 1

Views: 200

Answers (1)

user3063615
user3063615

Reputation: 21

Ok, I figured this out. You must send a Unix timestamp, i.e. seconds after Jan 1, 1970, to the grid, instead of a SQL datetime type.

Upvotes: 1

Related Questions