在React中用Dygraph显示两个系列

问题描述 投票:0回答:1

我想在dygraph中显示2个系列,但我不知道该怎么做,谢谢你的帮助。

这是我的代码:

    let datas = [];

    datas = state.logDatas.data;

        new Dygraph (
            'Two_series',
            datas,
            {
                labels: ["key", "value"],
                title: "",
                width: 1000,
                height: 400,
            }
        )
reactjs dygraphs
1个回答
0
投票

我找到了两个系列的示例选项卡“datas”:

[
  [1, null, 3],
  [2, 2, null],
  [3, null, 7],
  [4, 6, null],
  [5, null, 5],
  [6, 4, null]
]
© www.soinside.com 2019 - 2024. All rights reserved.