0
我創建了以下jqlotjqPlot最小刻度間隔
$.jqplot('chartdiv', JSON.parse(response.occnum), {
title: 'Occurrences',
legend: {
show: true,
renderer: $.jqplot.EnhancedLegendRenderer,
placement: "outsideGrid",
labels: response.labels,
location: "ne",
rowSpacing: "0px",
rendererOptions: {
// set to true to replot when toggling series on/off
// set to an options object to pass in replot options.
seriesToggle: 'normal',
seriesToggleReplot: {resetAxes: true}
}
},
seriesDefaults: {renderer:$.jqplot.BarRenderer},
axes: {
xaxis:{
label: 'Months',
tickOptions : {
tickInterval: 1}
},
yaxis: {
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
labelOptions:{
fontFamily:'Helvetica'
//fontSize: '14pt'
},
label: 'Occurrences number'
}
}
});
用以下數據
[[[7,4]],[[4,2],[5,1],[6,1],[7,1],[8,1]],[[5,2],[6,10],[7,6],[8,1]]]
並得到結果
我想餵養的情節在x軸處僅獲得整數值0,1,2,3而不是0.0,0.5,0.1等t我現在得到的帽子。