Home Assistant; Charts: Scroll- Zoom; Development status
Something is happening: the long-neglected history in Home Assistant is getting numerous improvements. With the 2025.1 release, the charts are getting a rudimentary zoom function, among other things. Rudimentary, because currently only one chart can be zoomed if there are several charts. And it is not yet possible to scroll to an older section. With the 2025.2 release, the chart library was migrated from chart.js to Apache Echart, as the chart library Chart.js originally used was increasingly reaching its performance limits. ECharts offers extended functionalities and better performance for complex tasks and larger data volumes.
Chart zoom function
The first pull request for the zoom function is included in release 2025.1. This represents an important step towards modernizing the history. The introduction of Echarts should pave the way for future functions: The introduction was swift, but the new functions are now a long time coming.
My expectations of the charts, possible future improvements
I often compare the functionality of Grafana or Plotly-Graph with the integrated Home Assistant charts. I miss some details in Home Assistant that other visualizations have already solved. For example, Home Assistant lacks the option to scroll to an older time period. I also miss the synchronization of the zoom status across all charts when several charts are displayed in the history or in the energy dashboard. This is currently only possible for the history, the statistics chart cards and the logbook via the date selection, but not directly via the scroll function of the charts.
Zoom using buttons: Rejected.
Alternatively, it would be possible to customize the time range based on the date picker, similar to the forward and back buttons, using own buttons:
With the zoom buttons, the time range can be easily enlarged or reduced, even for several charts at the same time. I submitted the necessary code change in December in a corresponding pull request on GitHub, but this was rejected in February 2025 because a comparable functionality is planned elsewhere. Since I don't want to wait that long, I still have the buttons in use in my Home Assistant instance. If you are interested in the buttons, please leave a comment on Github: https://github.com/home-assistant/frontend/pull/23358
Currently missing and possible future improvements of the charts:
- Linked charts: ECharts natively supports the creation of linked charts. For example, zooming in one chart can automatically update corresponding data in another. Status: There is currently only one feature request for this.
- Range selection for mobile devices:
Echarts is currently testing a function to select a specific range of charts on mobile devices:
Alternative cards
- Plotly Graph
- Advantage: flexible incl. the possibility to visualize historical data
- Disadvantages:
- Advanced config in YAML
- No date selection available
- cannot be called directly from any entity without creating your own dashboard
Relevant communication / feature request on Github
- https://community.home-assistant.io/t/wth-cant-we-zoom-in-on-the-history-graph/222391
- https://community.home-assistant.io/t/wth-cant-i-zoom-in-or-out-on-history-graphs/467734
- https://community.home-assistant.io/t/wth-can-t-i-zoom-in-or-out-on-history-graphs/802568
- Date selection for Plotly Graph? https://github.com/dbuezas/lovelace-plotly-graph-card/discussions/513
- EChart, Pull Request: https://github.com//home-assistant/frontend/pull/23809
- Area selection: https://github.com/home-assistant/frontend/issues/24107
- Zoom Sync / linked charts: https://github.com/home-assistant/frontend/issues/23766
Pull requests
- Initial zoom function https://github.com/home-assistant/frontend/pull/23183
- Reset buttons: https://github.com/home-assistant/frontend/pull/23469
- via the date picker: https://github.com/home-assistant/frontend/pull/23358

{{percentage}} % positive
