Javascript 在jqplot中显示月度数据
我有一系列的数据,每个月使用OHLC渲染器有一个数据点。我试图用jqplot显示它。它看起来很好,只是数据点太薄了,因为jqplot显示它们时,就好像它们只适用于当天一样。当我去掉日期,只指定月份和年份时,jqplot崩溃了 我的数据如下所示:Javascript 在jqplot中显示月度数据,javascript,jquery,jqplot,Javascript,Jquery,Jqplot,我有一系列的数据,每个月使用OHLC渲染器有一个数据点。我试图用jqplot显示它。它看起来很好,只是数据点太薄了,因为jqplot显示它们时,就好像它们只适用于当天一样。当我去掉日期,只指定月份和年份时,jqplot崩溃了 我的数据如下所示: [ [ "01/01/2008", 8152.9054008104704, 2612.7075024153296, 5382.8
[
[
"01/01/2008",
8152.9054008104704,
2612.7075024153296,
5382.8064516128998
],
// ...
[
"03/01/2008",
7554.0494491662403,
2086.69248631764,
4820.3709677419401
],
]
这种配置是可能的,还是我应该自己破解代码?政府没有明确说明如何做到这一点
我应该修改什么代码<代码>DateAxisRenderer
OHLCRenderer
?您可以使用jqplot.DateAxisRenderer插件的tickInterval选项来创建每月节拍
xaxis: {
renderer: jQuery.jqplot.DateAxisRenderer,
tickOptions: {
formatString:'%#d %I:%M %p'
},
rendererOptions: {
daTickInterval: [1, 'month']
}
}
您可以将tickInterval选项与jqplot.DateAxisRenderer插件一起使用,以创建每月刻度
xaxis: {
renderer: jQuery.jqplot.DateAxisRenderer,
tickOptions: {
formatString:'%#d %I:%M %p'
},
rendererOptions: {
daTickInterval: [1, 'month']
}
}
贾加迪什的
渲染器选项
对我不起作用。然而,这确实:
axes:{
xaxis:{
renderer:$.jqplot.DateAxisRenderer,
tickOptions:{formatString:'%b/%e/%Y'},
tickInterval:'1 month'
}
},
贾加迪什的
渲染器选项
对我不起作用。然而,这确实:
axes:{
xaxis:{
renderer:$.jqplot.DateAxisRenderer,
tickOptions:{formatString:'%b/%e/%Y'},
tickInterval:'1 month'
}
},