From 4e899c56ed7272e080fac501483818b549178673 Mon Sep 17 00:00:00 2001 From: Petar Petrov Date: Mon, 1 Dec 2025 15:43:20 +0200 Subject: [PATCH] Reduce the duration of init animation for charts to 500ms (#28262) Reduce the duration of init animation for charts --- src/components/chart/ha-chart-base.ts | 1 + src/components/chart/ha-sankey-chart.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/chart/ha-chart-base.ts b/src/components/chart/ha-chart-base.ts index ff8362dc5d..555ed1ad23 100644 --- a/src/components/chart/ha-chart-base.ts +++ b/src/components/chart/ha-chart-base.ts @@ -593,6 +593,7 @@ export class HaChartBase extends LitElement { } const options = { animation: !this._reducedMotion, + animationDuration: 500, darkMode: this._themes.darkMode ?? false, aria: { show: true }, dataZoom: this._getDataZoomConfig(), diff --git a/src/components/chart/ha-sankey-chart.ts b/src/components/chart/ha-sankey-chart.ts index 70b5023c30..10ede23c15 100644 --- a/src/components/chart/ha-sankey-chart.ts +++ b/src/components/chart/ha-sankey-chart.ts @@ -167,6 +167,7 @@ export class HaSankeyChart extends LitElement { curveness: 0.5, }, layoutIterations: 0, + animationDuration: 500, label: { formatter: (params) => data.nodes.find((node) => node.id === (params.data as Node).id)