【发布时间】:2017-05-29 10:39:28
【问题描述】:
我正在尝试使用他们的 API 从某个服务复制图表,但我在显示差距时遇到了问题。所以时不时地流不提供某些来源的信息,我通过在列中放置空值和 connectNull: false 来处理它。
但是有一种情况是值被空值隔离
[null, 66, null]
所以没有任何事情发生,因为点被隐藏了,但我想显示这个值。 我正在考虑在某些点上使用 css for force opacitiy:1,但我无法检测到它们。有什么建议吗?
self.chart = c3.generate({
bindto: d3.select('#' + self.chartDivId),
data: {
x: 'x',
xFormat: self.options.xAxisTimeFormat,
columns: self.chartDataSet,
},
line: {
connectNull: ???
},
point: {
show: ???
},
tooltip: {
show: true,
grouped: true
},
axis: {
x: {
type: 'timeseries',
tick: {
fit: false,
format: self.options.xAxisTimeFormat,
localtime: false
}
},
y: {
min: 0,
tick: {
fit: false,
format: function(d) {
return self.yFormatter(d);
},
}
}
}
});
【问题讨论】:
-
而不是 null 只是给 0 并尝试。
-
它将连接到 0 值,我需要知道源更新中的差距
标签: javascript d3.js charts stream c3.js