Data query with None aggregation

Hello! hopefully, this is not a duplicated one, I looked up and couldn’t find anything related to this.

I need to create a time series chart that displays historical temperatures for a list of devices, all in the same graph. The list of devices is dynamic, so I’m grouping them using a custom tag.

The Time Series Graph won’t work since, if I add a segment that points to the list of devices(by using the tag) it will aggregate the data. And using one segment by device is not possible for two reasons: 1) The list of devices could change 2) Imagine a scenario with 50 devices or more.

So now, I’m trying to integrate a third-party JS based chart (ZingChart) in Losant dashboard. For that, I was looking to use the “Custom HTML” block, but apparently there is no way to create a query that gathers the temperature from a list of devices (filtering by tag) without aggregating the data.

Another option would be to create a workflow where I could create my own time serie. The Data: Time Serie Node allows you to create a time serie payload for a list of devices with None aggregation.
But how can I point this time serie from the Custom HTML block?
I was thinking of creating a “virtual” device that would contain the timeserie data from the entire list of “real” devices, and then create a query in the Custom HTML that uses this single virtual device as input. But that’s kind of hacky and I was hoping to find a better way of doing this.
Any ideas or good practices regarding this?

Thank you very much in advance!!


Great question and your analysis is correct.

Using Experiences, you can expose an API to your data from within Losant using a workflow. This would enable you to create a secure, HTTP API endpoint ( /devices ) that returns a list of your devices.

Then, inside of the Custom HTML Block, you can make an HTTP request to get the data and append to the dom (example).

Does this help? I’d be happy to explain further.

Yes, very helpful, that was also one of the options I was managing, but forgot to mention in the original post. Thank you!


Something to keep in mind as you go down this path: Using “None” as an aggregation can quickly lead to large amounts of data (depending on your reporting interval). Too much data can overwhelm client slide charting libraries and you’ll start to see performance issues with your chart.