Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to plot uniform time-series in MongoDB Charts

I've just started to use MongoDB Charts to plot incoming data from a series of IoT devices that send at regular intervals. Each device sends a package with a timestamp and some data (JSON to our NoSQL db), and I would like to plot several devices on the same chart.

To visually check the continuity of the data flowing in (i.e. if a device fails to upload data) I want to plot each data-point over a continuous time-series x-axis. Does anyone know if MongoDB Charts has a feature to make the x-axis continuous? Currently, the chart plots one point per observation and space these equally no matter the time-in between.

Example of data: Point 1-2-3 all have 6 minutes in between, but visually appear to be non-uniform, since the x-axis is not continuous:

like image 281
Jesper Avatar asked Feb 14 '20 07:02

Jesper


1 Answers

Yes, MongoDB Charts has a "Continuous Line" chart type that should do what you want. As you discovered, the discrete chart always aggregates values over binned time periods, but the continuous version plots a point for each document. Please see the following screenshot as an example.

enter image description here

like image 77
Tom Hollander Avatar answered Sep 17 '22 12:09

Tom Hollander