如何在自定义线中绘制自定义线和隐藏线?

时间:2019-02-18 07:08:14

标签: javascript dygraphs

我收到一个请求,他们希望每个数据的两个值成为一行。 其余的值和往常一样。

这些是我现在拥有的代码。

javascript

new Dygraph(
    document.getElementById("bp_chart"),
    "restful/char/bp/#{memberInfo.selectedContract.member.id}",
    {labels: ['Date', '#{msg['measure.BP.SBP']}', '#{msg['measure.BP.DBP']}', '#{msg['measure.BP.pulse']}', "#{msg['measure.BP.SBPover']}", "#{msg['measure.BP.DBPover']}", "#{msg['measure.BP.pulseover']}"],
    showRangeSelector: true,
    '#{msg['measure.BP.SBPover']}': {
        strokeWidth: 0.0,
        drawPoints: true,
        pointSize: 2,
        color: 'red'
    }, '#{msg['measure.BP.DBPover']}': {
        strokeWidth: 0.0,
        drawPoints: true,
        pointSize: 2,
        color: 'red'
    }, '#{msg['measure.BP.pulseover']}': {
        strokeWidth: 0.0,
        drawPoints: true,
        pointSize: 2,
        color: 'red'
    }
});

csv数据

2019/02/15 14:40:52, 132, 87, 70, , , 
2019/02/15 14:32:49, 132, 87, 70, , , 
2019/02/15 14:16:41, 132, 87, 70, , , 
2019/02/15 09:53:01, 124, 85, 70, , , 
2019/02/15 09:43:36, 130, 86, 70, , , 
2019/02/14 16:34:59, 140, 100, 59, , , 
2019/02/14 16:34:49, 141, 99, 60, , , 
2019/02/12 18:23:09, 141, 99, 60, , , 
2019/02/12 18:17:56, 149, 97, 62, , , 
2019/02/12 17:38:15, 161, 90, 57, 161, , 
2019/02/12 16:58:51, 119, 79, 98, , , 
2019/02/12 16:51:59, 121, 79, 99, , , 
2019/02/12 14:57:54, 143, 88, 59, , , 
2019/01/30 15:37:58, 115, 80, 63, , , 
2019/01/23 14:25:40, 132, 97, 64, , , 

外观如何(不允许我嵌入图片,请点击链接查看)
https://i.imgur.com/jLEjVOP.png

每个数据的两个值合为一行(红点仍应保留)
https://i.imgur.com/D8yk7TO.png

隐藏两个值的原始行(这就是他们想要的)
https://i.imgur.com/ocfQC3r.png

是否可以通过数据值绘制自定义线并隐藏一些线?

0 个答案:

没有答案