折线图周期 maxPeriod

Line chart period maxPeriod

我有一个包含日期时间的数据集,我想用句点显示我的数据。但是如果我的数据集有一个没有周期的普通数据,也必须显示它。

我的数据集;
2017 年 10 月 18 日 08:00
18.10.2017 08:15
18.10.2017 08:30
18.10.2017 08:40
2017 年 10 月 18 日 09:15

我的经期:15 分钟

如何查看 2017 年 10 月 18 日的数据 08:40?

我的数据:

    [
        {
        "column-1": 8,
        "column-2": 5,
        "date": "2014-03-01 08:00"
        },
        {
        "column-1": 6,
        "column-2": 7,
        "date": "2014-03-01 08:15"
        },
        {
        "column-1": 1,
        "column-2": 3,
        "date": "2014-03-01 08:30"
        },
        {
        "column-1": 5,
        "column-2": 3,
        "date": "2014-03-01 08:40"
        },
        {
        "column-1": 2,
        "column-2": 1,
        "date": "2014-03-01 09:15"
        },
        {
        "column-1": 3,
        "column-2": 2,
        "date": "2014-03-01 09:30"
        },
        {
        "column-1": 6,
        "column-2": 8,
        "date": "2014-03-01 09:45"
        }

确保您的 minPeriod is set to the lowest period that can display your data. If your data isn't always in 15 minute increments, then use "mm" instead of "15mm". Since you have gaps, you'll also want to set the gapPeriod 值最能代表您希望差距出现的位置 - 如果您的数据通常在 15 分钟内,则将其设置为 15.1:

  graphs: [
    {
      // ...
      connect: false,
      gapPeriod: 15.1,
      // ...
    },{
      // ...
      connect: false,
      gapPeriod: 15.1,
      // ...
    }
  ],
  // ...
  categoryAxis: {
    parseDates: true,
    minPeriod: "mm"
  }

Demo