From 56cc4e8d4d848f9f6f3ff55a25e177f309aee652 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 6 Apr 2023 14:39:53 +0200 Subject: [PATCH] Fix tooltip being cutoff in history panel (#16087) --- src/components/chart/ha-chart-base.ts | 6 +++++- src/panels/history/ha-panel-history.ts | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/chart/ha-chart-base.ts b/src/components/chart/ha-chart-base.ts index b4ecf7e063..902d567885 100644 --- a/src/components/chart/ha-chart-base.ts +++ b/src/components/chart/ha-chart-base.ts @@ -276,7 +276,11 @@ export default class HaChartBase extends LitElement { top: this.chart!.canvas.offsetTop + context.tooltip.caretY + 12 + "px", left: this.chart!.canvas.offsetLeft + - clamp(context.tooltip.caretX, 100, this.clientWidth - 100) - + clamp( + context.tooltip.caretX, + 100, + this.clientWidth - 100 - this.paddingYAxis + ) - 100 + "px", }; diff --git a/src/panels/history/ha-panel-history.ts b/src/panels/history/ha-panel-history.ts index 6bb2e9ce11..fb2e74299b 100644 --- a/src/panels/history/ha-panel-history.ts +++ b/src/panels/history/ha-panel-history.ts @@ -518,10 +518,6 @@ class HaPanelHistory extends SubscribeMixin(LitElement) { padding-bottom: max(env(safe-area-inset-bottom), 16px); } - state-history-charts { - overflow-x: hidden; - } - :host([virtualize]) { height: 100%; }