From a7eee8fe6268f851081f18f8374310c7be54a9bc Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Tue, 26 Mar 2024 13:01:03 +0200 Subject: [PATCH] UI: Time-series chart dark mode improvement --- .../home/components/widget/lib/chart/time-series-chart.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.ts b/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.ts index 462825087e..65a323e4b6 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.ts @@ -139,7 +139,8 @@ export class TbTimeSeriesChart { this.settings = mergeDeep({} as TimeSeriesChartSettings, timeSeriesChartDefaultSettings, this.inputSettings as TimeSeriesChartSettings); - const dashboardPageElement = this.ctx.$containerParent.parents('.tb-dashboard-page'); + const $dashboardPageElement = this.ctx.$containerParent.parents('.tb-dashboard-page'); + const dashboardPageElement = $($dashboardPageElement[$dashboardPageElement.length-1]); this.darkMode = this.settings.darkMode || dashboardPageElement.hasClass('dark'); this.setupYAxes(); this.setupData();