Why does Chart.js render a diagonal line between the end point and beginning of a graph?

26 Views Asked by At

I have multiple chartjs line charts, all of them works great except for this one and I cant figure out what is wrong with it. Here is a link to a video that shows the behavior of the graph.

And here is the last 30 data points.

{
    "values": [
        ...
        14.8,
        14.8,
        14.8,
        22.8,
        22.8,
        22.8,
        22.8,
        8,
        8,
        8,
        8,
        8,
        16,
        16,
        16,
        16,
        16,
        24,
        24,
        24,
        24,
        6.8,
        6.8,
        6.8,
        6.8,
        6.8,
        14.8,
        14.8,
        14.8,
        14.8
    ],
    "timestamps": [
        ...
        "2024-03-20T12:22:28-05:00",
        "2024-03-20T12:22:28-05:00",
        "2024-03-20T12:22:28-05:00",
        "2024-03-20T12:22:31-05:00",
        "2024-03-20T12:22:31-05:00",
        "2024-03-20T12:22:33-05:00",
        "2024-03-20T12:22:33-05:00",
        "2024-03-20T12:22:35-05:00",
        "2024-03-20T12:22:35-05:00",
        "2024-03-20T12:22:35-05:00",
        "2024-03-20T12:22:38-05:00",
        "2024-03-20T12:22:38-05:00",
        "2024-03-20T12:22:40-05:00",
        "2024-03-20T12:22:40-05:00",
        "2024-03-20T12:22:42-05:00",
        "2024-03-20T12:22:42-05:00",
        "2024-03-20T12:22:42-05:00",
        "2024-03-20T12:22:45-05:00",
        "2024-03-20T12:22:45-05:00",
        "2024-03-20T12:22:47-05:00",
        "2024-03-20T12:22:47-05:00",
        "2024-03-20T12:22:49-05:00",
        "2024-03-20T12:22:49-05:00",
        "2024-03-20T12:22:49-05:00",
        "2024-03-20T12:22:52-05:00",
        "2024-03-20T12:22:52-05:00",
        "2024-03-20T12:22:54-05:00",
        "2024-03-20T12:22:54-05:00",
        "2024-03-20T12:22:56-05:00",
        "2024-03-20T12:22:56-05:00"
    ]
}
0

There are 0 best solutions below