diff --git a/src/components/chart/state-history-chart-line.ts b/src/components/chart/state-history-chart-line.ts index b7a44cf043..8dc0afae98 100644 --- a/src/components/chart/state-history-chart-line.ts +++ b/src/components/chart/state-history-chart-line.ts @@ -305,7 +305,8 @@ export class StateHistoryChartLine extends LitElement { visualMap: this._visualMap, tooltip: { trigger: "axis", - appendTo: document.body, + position: "bottom", + align: "center", formatter: this._renderTooltip, }, }; diff --git a/src/components/chart/state-history-chart-timeline.ts b/src/components/chart/state-history-chart-timeline.ts index 6287ac6eb2..e14042409f 100644 --- a/src/components/chart/state-history-chart-timeline.ts +++ b/src/components/chart/state-history-chart-timeline.ts @@ -255,7 +255,8 @@ export class StateHistoryChartTimeline extends LitElement { right: rtl ? labelWidth : 1, }, tooltip: { - appendTo: document.body, + position: "bottom", + align: "center", formatter: this._renderTooltip, }, }; diff --git a/src/components/chart/statistics-chart.ts b/src/components/chart/statistics-chart.ts index a536e26e78..55a299c787 100644 --- a/src/components/chart/statistics-chart.ts +++ b/src/components/chart/statistics-chart.ts @@ -335,7 +335,8 @@ export class StatisticsChart extends LitElement { }, tooltip: { trigger: "axis", - appendTo: document.body, + position: "bottom", + align: "center", formatter: this._renderTooltip, }, };