Jed Tan
Jed Tan

Reputation: 39

Series and Ticks not rendering for Date Axes in JQPlot

I am currently working on graphing some performance data in JQPlot, but I can't get the actual data to render in the graph. Here is my js file contents,

var devserv111_read =[['7/22/2014 6:32 PM', 86.2570825582289],['7/22/2014 6:32     PM',57.5794327789494],['7/22/2014 6:32 PM', 19.2518887867064],['7/22/2014 6:32 PM', 62.34265069168],['7/22/2014 6:33 PM', 0],['7/22/2014 6:33 PM', 56.6436644845048]];
var plot_devserv111 = $.jqplot('chart_devserv111', [devserv111_read], {axes:{xaxis:{renderer:$.jqplot.DateAxisRenderer}}});

In the div chart_devserv111, a blank canvas shows up with appropriate y-axis ticks, but no points show up on the graph nor x-ticks. I was able to make the graph work with just the numerical data (not using dates for the x-axis).

Any help would be greatly appreciated!

Upvotes: 0

Views: 208

Answers (1)

AnthonyLeGovic
AnthonyLeGovic

Reputation: 2335

You have to include some plugins in order to draw your features. Especially the dateAxisRenderer plugin :

<script type="text/javascript" src="../src/plugins/jqplot.dateAxisRenderer.min.js"></script>

Please see a working example here, documentation here and an example here

Upvotes: 1

Related Questions