TimeSeries Chart giving Errors

I am trying to create a TimeSeriesChart using a query that pulls just a value and timestamp. However, when I do that I get a component error on the chart. No other information. When I go on the browser I see the following error:

Error: The "series" property must contain data in chronological order.
    at C.renderErrorDisplay (PerspectiveTimeseriesCharts.84e808f37e30d36c24fb.js:2:945778)
    at C.render (PerspectiveTimeseriesCharts.84e808f37e30d36c24fb.js:2:949287)
    at Ie (react-dom-16.14.0.js:104:8)
    at rh (react-dom-16.14.0.js:103:334)
    at zj (react-dom-16.14.0.js:228:490)
    at Th (react-dom-16.14.0.js:152:223)
    at tj (react-dom-16.14.0.js:152:152)
    at Te (react-dom-16.14.0.js:146:151)
    at react-dom-16.14.0.js:61:68
    at unstable_runWithPriority (react-16.14.0.js:25:260)

Anyone have any idea what the issue is. I have all information coming in ASC by the time. So I am not sure what is going on.

Post the props.series so we can have a look.

[
  {
    "name": "Boiler",
    "data": {
      "$": [
        "ds",
        192,
        1697833490188
      ],
      "$columns": [
        {
          "name": "value",
          "type": "String",
          "data": [
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "75.0",
            "75.0",
            "76.0",
            "0",
            "0",
            "75.0",
            "93.0",
            "0",
            "0",
            "94.0",
            "94.0",
            "95.0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "167.0",
            "0",
            "0",
            "191.0",
            "0",
            "0",
            "220.0"
          ]
        },
        {
          "name": "time",
          "type": "Date",
          "data": [
            1696833208000,
            1696834458000,
            1696834471000,
            1696834559000,
            1696895570000,
            1696895576000,
            1696905848000,
            1696905881000,
            1696905889000,
            1696949756000,
            1696949769000,
            1696966655000,
            1696966664000,
            1696969291000,
            1696969295000,
            1697039559000,
            1697039564000,
            1697039573000,
            1697042371000,
            1697042372000,
            1697043564000,
            1697044095000,
            1697044100000,
            1697047654000,
            1697053330000,
            1697053330000,
            1697060078000,
            1697128338000,
            1697129830000,
            1697129835000,
            1697129851000,
            1697130752000,
            1697133721000,
            1697238985000,
            1697239002000,
            1697239002000,
            1697473343000,
            1697473350000,
            1697473381000,
            1697560392000,
            1697560393000,
            1697560501000,
            1697590473000,
            1697590474000,
            1697667582000
          ]
        }
      ]
    }
  }
]

Hopefully that is what you are looking for

Each value entry must be labeled with the column name to which it corresponds. Data can also be an array containing value entries (all must be numbers). Each value entry consists of a timestamp (which must be the first value) and one or more values that were captured at that time.

https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Time+Series+Chart

Try swapping the column order in your query.

1 Like

wow ok that seemed to work. Thank you very much spent hours trying to go through it

We all have!

By the way, if you're not already aware, there's a dataset icon beside props.series.0.data that allows you to inspect the dataset. I was able to paste your data in there, check the dataset and had a vague memory that the timestamp had to be the first column.

Oh good to know. Thank you

Sorry to revive this but I have another issue. I managed to get my trends going. However, now we I load that page 2 or 3 times. The whole server actually crashes and has to reboot. Any idea why this could be happening? Ive got 3 trends on the page.