diff --git a/src/rust/lqosd/src/node_manager/js_build/src/graphs/dashboard_graph.js b/src/rust/lqosd/src/node_manager/js_build/src/graphs/dashboard_graph.js index a8a486fc..da6c0734 100644 --- a/src/rust/lqosd/src/node_manager/js_build/src/graphs/dashboard_graph.js +++ b/src/rust/lqosd/src/node_manager/js_build/src/graphs/dashboard_graph.js @@ -6,7 +6,6 @@ export class DashboardGraph { this.dom = document.getElementById(id); this.dom.classList.add("muted"); if (isDarkMode()) { - this.chart = echarts.init(this.dom, 'dark'); window.graphPalette = [ '#4992ff', '#7cffb2', @@ -18,8 +17,8 @@ export class DashboardGraph { '#8d48e3', '#dd79ff' ]; + this.chart = echarts.init(this.dom, 'dark'); } else { - this.chart = echarts.init(this.dom, 'vintage'); window.graphPalette = [ '#d87c7c', '#919e8b', @@ -32,6 +31,7 @@ export class DashboardGraph { '#724e58', '#4b565b' ]; + this.chart = echarts.init(this.dom, 'vintage'); } this.chart.showLoading(); this.option = {}; diff --git a/src/rust/lqosd/src/node_manager/js_build/src/helpers/dark_mode.js b/src/rust/lqosd/src/node_manager/js_build/src/helpers/dark_mode.js index 3ed9e450..62674b95 100644 --- a/src/rust/lqosd/src/node_manager/js_build/src/helpers/dark_mode.js +++ b/src/rust/lqosd/src/node_manager/js_build/src/helpers/dark_mode.js @@ -23,21 +23,6 @@ export function initDayNightMode() { document.body.classList.add('dark-mode'); document.documentElement.setAttribute('data-bs-theme', "dark"); localStorage.setItem('theme', 'dark'); - window.graphPalette = [ - '#4992ff', - '#7cffb2', - '#fddd60', - '#ff6e76', - '#58d9f9', - '#05c091', - '#ff8a45', - '#8d48e3', - '#dd79ff' - ]; - } else { - document.body.classList.remove('dark-mode'); - document.documentElement.setAttribute('data-bs-theme', "light"); - localStorage.setItem('theme', 'light'); window.graphPalette = [ '#d87c7c', '#919e8b', @@ -50,6 +35,21 @@ export function initDayNightMode() { '#724e58', '#4b565b' ]; + } else { + document.body.classList.remove('dark-mode'); + document.documentElement.setAttribute('data-bs-theme', "light"); + localStorage.setItem('theme', 'light'); + window.graphPalette = [ + '#4992ff', + '#7cffb2', + '#fddd60', + '#ff6e76', + '#58d9f9', + '#05c091', + '#ff8a45', + '#8d48e3', + '#dd79ff' + ]; } if (window.graphList !== undefined) { window.graphList.forEach((graph) => {