【发布时间】:2014-12-23 02:08:29
【问题描述】:
我有这张图表,它的 x 轴加载了接近一千个时间序列点。
这些点没有吸引力。
我可以隐藏 x 轴,但我希望日期显示在下方,减去刻度点。
有没有办法在离开时间的同时删除刻度点。 (请忽略 x 轴上的数字,我知道它们是错误的)。
我希望这是一个类别折线图并完全避免时间序列。
代码,为简单起见删除了数据 -
var chart = c3.generate({
padding: {
right: 30
},
data: {
x: 'x',
columns: [
['x',1324252800,1324339200],
['OECD Crude Oil Price',102.91,105.05]
],
type: 'line',
onclick: function (d, element) { console.log("onclick", d, element); },
onmouseover: function (d) { console.log("onmouseover", d); },
onmouseout: function (d) { console.log("onmouseout", d); },
order: null
},
point: {
show: false
},
axis: {
x: {
//show:false,
//I don't want this, I want to see the dates
type: 'timeseries',
tick: {
culling: {
max: 3
},
multiline: false
}
},
y: {
tick: {
format: function (d) { return "$ " + d ; }
}
}
},
});
提前致谢
【问题讨论】:
标签: javascript c3.js