我在创建折线图方面取得了巨大的成功,部分原因在于此论坛的回复质量!
但是,我要么尝试做一些特别的事情,要么无法弄清楚搜索字词。我试图在同一个图表上绘制两个数据集:
表示温度的线图 表示设备何时处于活动状态的条形图(在RRD中为1或0值)。我想将它们作为透明背景条,这样我就可以看到设备是否正确触发以及设备的启动时间。
我有两个问题;
以下是我正在使用的数据片段:
"data" : [
{
"bars" : {
"fillColor" : {
"colors" : [
{
"opacity" : 1
},
{
"opacity" : 1
}
]
},
"lineWidth" : 0,
"show" : "true"
},
"color" : "blue",
"data" : [
[
"1421280000000",
"0"
],
[
"1421452800000",
"0"
],
[
"1421625600000",
"0"
],
[
"1421798400000",
"1"
],
[
"1421971200000",
"1"
],
[
"1422144000000",
"1"
],
[
"1422316800000",
"0"
],
[
"1422489600000",
"0"
],
[
"1422662400000",
"0"
],
[
"1422835200000",
"0"
]
]
}
"label" : "D1",
"yaxes" : 1
},
{
"bars" : {
"fillColor" : {
"colors" : [
{
"opacity" : 1
},
{
"opacity" : 1
}
]
},
"lineWidth" : 0,
"show" : "true"
},
"color" : "red",
"data" : [
]
"1421280000000",
"1"
],
[
"1421452800000",
"1"
],
[
"1421625600000",
"1"
],
[
"1421798400000",
"0"
],
[
"1421971200000",
"1"
],
[
"1422144000000",
"0"
],
[
"1422316800000",
"0"
],
[
"1422489600000",
"0"
],
[
"1422662400000",
"1"
],
[
"1422835200000",
"0"
]
],
"label" : "D2",
"yaxes" : 1
}
],