Combine fixed-time history objects into a single object with an x axis for time
This idea came up when working on #16513 (moved) and #24729 (moved), though it's not strictly related to those.
We could stop giving out history data for fixed intervals and instead provide all data in a single history object along with a normalized x axis with timestamps. For example, we could remove the static "interval"
field and add an array "intervals"
and a factor "interval_factor"
as follows:
"first": "2018-01-13 12:00:00",
"last": "2018-02-06 12:00:00",
"intervals": [4, 4, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1],
"interval_factor": 86400,
"factor": 5152.109783914505,
"count": 15,
"values": [461, 468, 515, 475, 452, 605, 572, 419, 564, 579, 502, 472, 555, 542, 553]
If we do this, we'll have to teach Relay Search to draw different graphs based on this single history object. Basically, it will need to learn how to downsample data points that are too detailed for a graph showing a long period of time.