That’s indeed a change I’ll look into this evening or later this week, and I’ll try to fix or revert it in the next version.
To clarify how it worked in version 1.0.0 versus 1.1.0: The data points come from the Homey Insights API. You can see similar data in the Insights panel of the Homey Web App.
For example:
- A chart for “Last 24 hours” shows data points every 5 minutes.
- A chart for “Last 7 days” only shows data points per hour.
In version 1.0.0, DataVista used:
- “Last 24 hours” as the source for the rolling day configuration
While developing version 1.1.0, I started with:
- “Last 24 hours” as the source for the “This” + “24 hours” line
- “Last 7 days” as the source for the “Previous” + “24 hours” line.
DataVista then trimmed the “7 days” dataset to include only the previous day’s data.
However, this caused both lines in the chart to have a different number of data points (per 5 minutes vs per hour) when comparing rolling periods like “last 24 hours” vs “previous 24 hours”.
Clicking a point on the chart would often show a tooltip with only a value for the “Last 24 hours” line (since it had 5-minute intervals), and you’d only see both values when clicking exactly on an hourly data point.
In 1.1.0, I tried to fix this by using “Last 7 days” as the source for both “Last 24 hours” and “Previous 24 hours.” This solved the mismatch but resulted in charts with hourly steps for both lines, meaning less precision overall.
Ideally, I’d have 5-minute data points for “Last 7 days” as well, but Homey aggregates the data over time, reducing precision the further back it goes.
I’ll need to decide whether to go back to using the most precise dataset available, even if that means both lines have different step sizes, find another solution such as filling in the missing data points (though I’d prefer to avoid inferring data), or simply leave it as it is. Since this only applies when comparing rolling periods (this vs. previous), I’ll probably revert to using the most precise dataset.