我想在我的圖表中顯示的月/年,但與x軸標籤的錯誤:jQuery的海軍報:在x軸上reapeating標籤
有四月2012年3次(以及5月和6月)。
下面是代碼
function showGraph() {
var data = [
{ label : "Odmeny", data: [ [(new Date('2012/04/01')).getTime(), 10], [(new Date('2012/05/01')).getTime(), 10], [(new Date('2012/06/01')).getTime(), 10] ] },
{ label : "Koeficienty", data: [ [(new Date('2012/04/01')).getTime(), 11], [(new Date('2012/05/01')).getTime(), 13], [(new Date('2012/06/01')).getTime(), 16], [(new Date('2012/07/01')).getTime(), 12] ] }
];
var options = {
xaxes: [{
mode: "time",
timeformat: "%b %y",
monthNames: ["jan", "feb", "mar", "apr", "máj", "jún", "júl", "aug", "sep", "okt", "nov", "dec"]
}],
yaxes: [ {
min: 0
} ],
series: {
lines: {
show: true,
fill: null
},
points: {
show: true,
radius: 3,
lineWidth: 2,
fill: true,
fillColor: "#ffffff",
symbol: "circle"
}
},
grid: { hoverable: true, clickable: true }
};
$.plot($("#placeholder"), data, options);
}
您正在使用什麼版本的海軍報的?它是Github主分支嗎? – DNS
那麼,有一些信息:jQuery的JavaScript繪圖庫,v。0.7,和jQuery的插件,用於處理顏色,版本1.1。 ...不,它不是來自Github的人 –
你可以試試Github上的那個嗎?它是實驗性的,並且打破了一些東西,但是我們對時間支持做了很多改進;我想知道你看到的問題是否可以解決。如果你確實嘗試過,請記住,時間支持已被移入插件中,所以你需要包含額外的.js文件。 – DNS