我有一个简单的c3js线图w/3不同的线。当我“取消选择”所有三个数据源时,x轴勾值就消失了。我想知道是否有办法扭转这种行为?即使没有数据,我也想显示x轴的刻度值。
xaxis滴答值属于“timeseries”类型。谢谢!
下面是我对线图的c3配置:
bindto: '#test',
data: {
x: 'date',
xFormat: '%m%d',
columns: [],
},
legend: {
position: 'bottom',
},
axis: {
y: {
tick: {
format: function (d) { return d + '%'; },
count: 5,
},
max: 100,
padding: {
top: 0,
bottom: 0,
},
},
x: {
type: 'timeseries',
tick: {
culling: false,
},
},
},
color: {
pattern: [testRateColor, firstRateColor, secRateColor],
},发布于 2015-05-18 19:36:53
不幸的是,这个功能被放入了c3.js中,改变这个功能的唯一方法是猴子补丁(除了d3之外)。您将在c3.js第6814行找到违法者:
tickExit = tick.exit().remove(),如果将此更改为:
tickExit = function() {},蜱不再被移除。
https://stackoverflow.com/questions/30310441
复制相似问题