0
我不能在我的圖表中繪製/填充垂直部分,就像在此示例中顯示的那樣:http://services.mbi.ucla.edu/jqplot/examples/draw-rectangles.html。據我所知,x軸應該是數字,在我的圖中我有x軸是字符串。jqPlot填充x軸的垂直部分是一個字符串
我畫我的情節:
plot2 = $.jqplot('chartplot'+index, [s3], {
seriesDefaults: {
renderer :$.jqplot.BarRenderer,
pointLabels: { show: true },
rendererOptions: {shadow:false }
},
series: [{label:"Average Fu - "+single_legend_lbl+""}],
legend: {
show: true,
placement: 'insideGrid'
},
axesDefaults: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer ,
tickOptions: { formatString: '%#d' }
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ticks,
tickOptions: {
angle: -90,
fontSize: '10pt',
}
}
},
seriesColors: [bar_color],
canvasOverlay: {
show: true,
objects: [
{ rectangle: { xmin: 'Silver Fu', xmax: 'Light Green Fu', xminOffset: "0px", xmaxOffset: "0px", yminOffset: "0px", ymaxOffset: "0px",
color: "rgba(0, 200, 200, 0.3)", showTooltip: true, tooltipFormatString: "Holidays" } },
]
}
});
附加/鏈接的是我的渲染圖,我想顏色,我圖分爲三個部分按行: my rendered graph