Я новичок в библиотеке jqplot, я использую следующий код для построения графика jqplot, но он не печатает
$(document).ready(function () {
var cdata = [];
cdata.push([1.1, '01/13/2020 17:16']);
cdata.push([2.9, '01/12/2020 17:16']);
cdata.push([1.2, '01/11/2020 17:16']);
cdata.push([3.6, '01/10/2020 17:16']);
cdata.push([6.7, '01/09/2020 17:16']);
cdata.push([8.8, '01/08/2020 17:16']);
cdata.push([5.5, '01/07/2020 17:16']);
cdata.push([7.4, '01/06/2020 17:16']);
cdata.push([4.3, '01/05/2020 17:16']);
var plot2 = $.jqplot('chart2', cdata, {
// Give the plot a title.
title: 'Graph Monitor',
// You can specify options for all axes on the plot at once with
// the axesDefaults object. Here, we're using a canvas renderer
// to draw the axis label which allows rotated text.
axesDefaults: {
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
},
// Likewise, seriesDefaults specifies default options for all
// series in a plot. Options specified in seriesDefaults or
// axesDefaults can be overridden by individual series or
// axes options.
// Here we turn on smoothing for the line.
seriesDefaults: {
rendererOptions: {
smooth: true
}
},
// An axes object holds options for all axes.
// Allowable axes are xaxis, x2axis, yaxis, y2axis, y3axis, ...
// Up to 9 y axes are supported.
axes: {
// options for each axis are specified in seperate option objects.
xaxis: {
label: "Date",
// Turn off "padding". This will allow data point to lie on the
// edges of the grid. Default padding is 1.2 and will keep all
// points inside the bounds of the grid.
pad: 0
},
yaxis: {
label: "Level"
}
}
});
});
fiddle: https://jsfiddle.net/a5fmbyv2/