简体   繁体   English

系列和刻度没有在JQPlot中为日期轴渲染

[英]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. 我目前正在JQPlot中绘制一些性能数据的图形,但无法获取要在图形中呈现的实际数据。 Here is my js file contents, 这是我的js文件内容,

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. 在div chart_devserv111中,显示空白画布,并带有适当的y轴刻度,但图形或x刻度上均未显示任何点。 I was able to make the graph work with just the numerical data (not using dates for the x-axis). 我能够使图形仅与数字数据一起使用(而不将日期用于x轴)。

Any help would be greatly appreciated! 任何帮助将不胜感激!

You have to include some plugins in order to draw your features. 您必须包括一些插件才能绘制功能。 Especially the dateAxisRenderer plugin : 特别是dateAxisRenderer插件:

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

Please see a working example here , documentation here and an example here 请参阅工作示例这里 ,文件在这里和示例在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM