github dbuezas/lovelace-plotly-graph-card v4.0.0

latest releases: v4.0.2, v4.0.1
one month ago

The first major release in two years. It collects everything from the five release candidates (rc.1 to rc.5). Thanks to everyone who contributed and tested!

Special thanks

A special thank you to @rosenrot00 and @dewi-ny-je (Olaf Marzocchi). Between them they wrote 45 of the PRs in this release, and they also reviewed PRs, answered questions and kept the issues in order. This release would not exist without them.

Breaking changes

Check these before you update:

  • Plotly.js 2.34 → 4.1.2. Plotly removed some old options, for example plain-string titles, transforms, hsv() colors and Mapbox traces. See Plotly.js 4 compatibility (#631).
  • Entity filters replace defaults.entity.filters, instead of being merged with them. Use filters: [] to turn the defaults off for one entity (#656).
  • Some filters give different (correct) results: integrate (first interval, reset_every), median, sliding_window_moving_average, and resample at exact sample times (#651, #411).
  • Dates follow Home Assistant's time zone setting (your profile's "local" or "server"), or the new time_zone: option. Give times as dates (new Date()), not numbers (Date.now()). In on_click and hover, x values are date strings in that time zone (#659).
  • Calendar periods: resample: 1d and integrate with reset_every: 1d start at midnight, also on 23- and 25-hour days. Weeks start on Home Assistant's first weekday, months on the 1st, years on January 1st. Use 24h for fixed 24-hour steps (#659, #670, #707).
  • History lines stay drawn until a state becomes unavailable, instead of leaving a gap when nothing changed. Click events count the extra drawn points, see on_click in the readme (#665).
  • Trace names follow Home Assistant's naming, and name: accepts Home Assistant's list form, for example name: [{type: area}, {type: entity}] (HA 2026.4 or newer) (#646).
  • Bar graphs use color_scheme, so bar colors change if you set a custom scheme (#664).
  • The default font matches Home Assistant (#657).
  • disable_pinch_to_zoom is deprecated. It still works and is the same as extended_touch_support: false (#673).

New features

  • Touch gestures: pinch to zoom and pan like a map. Press and hold, then slide, to see the values under your finger. Double tap, then drag, to zoom or pan. Configure them with extended_touch_support (#673, #678, #687).
  • All Plotly chart types, including scattergl, splom, parcoords, maps (scattermap, choroplethmap, densitymap) and quiver (#632, #677).
  • Presets, and defaults.xaxes (#526).
  • New filters: min_max (cuts dense data down to the highs and lows, with full detail when you zoom in), align_timestamps (combines stored series by timestamp), and resample with interpolate: true (#710, #694, #709, #411).
  • New options: show_extrema: true labels the minimum and maximum of a trace. align_zero: true puts zero at the same height on overlaid Y axes (#696, #700).
  • Statistics: period: year (#702).
  • on_click on annotations and updatemenus buttons (#525).
  • Filters can be async, and filter lists can be generated with $ex/$fn (#597, #662).
  • Home Assistant theme colors in css_vars, for example css_vars['blue-color'] (#653).
  • The visual editor's Y-axis bounds, log scale and "fit Y data" now work (#661).

Faster and more reliable

  • Plotly and chart types load on demand. Dashboards without plotly cards load about 10× faster, and charts with only line or bar traces about 3× faster (#677, #711).
  • Fewer requests: history and statistics requests are batched, shared between cards, and fetch only the fields needed (#630, #638, #689, #690).
  • Statistics refresh when Home Assistant publishes new data, not on every state change (#667).
  • Live updates no longer miss or stall on fast changes. Cards out of view update every 30 s and catch up once visible (#682, #695).
  • Smoother loading: a stable loading state, no white flash, fewer redundant renders, limited cache growth, and no crash on very long histories (#634, #635, #637, #639, #654, #660).
  • Fixes: a pan made while data loads is kept (#683). The right margin for a second Y axis no longer depends on YAML order (#698). Trendlines keep numeric X values (#701). Templates can read default names and units anywhere (#697). No duplicate hover for show_value (#626).

What's Changed

New Contributors

Full Changelog: v3.3.5...v4.0.0

Don't miss a new lovelace-plotly-graph-card release

NewReleases is sending notifications on new releases.