Reduce the duration of init animation for charts to 500ms (#28262)

Reduce the duration of init animation for charts
This commit is contained in:
Petar Petrov 2025-12-01 15:43:20 +02:00 committed by Bram Kragten
parent 3e924e0cde
commit ecdf374902
2 changed files with 2 additions and 0 deletions

View File

@ -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(),

View File

@ -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)