Client - fix dark mode on chart when browser preferences

This commit is contained in:
Sam 2023-12-20 13:01:38 +01:00
parent cc829b412a
commit e8e79a42dc
2 changed files with 16 additions and 12 deletions

View File

@ -42,14 +42,16 @@
() => store.getters[ROOT_STORE.GETTERS.DARK_MODE]
)
const lineColors = computed(() => ({
color: darkMode.value
? chartsColors.darkMode.line
: chartsColors.ligthMode.line,
color:
darkMode.value !== false
? chartsColors.darkMode.line
: chartsColors.ligthMode.line,
}))
const textColors = computed(() => ({
color: darkMode.value
? chartsColors.darkMode.text
: chartsColors.ligthMode.text,
color:
darkMode.value !== false
? chartsColors.darkMode.text
: chartsColors.ligthMode.text,
}))
const chartData = computed(() => ({

View File

@ -118,14 +118,16 @@
() => datasets.value.coordinates
)
const lineColors = computed(() => ({
color: darkMode.value
? chartsColors.darkMode.line
: chartsColors.ligthMode.line,
color:
darkMode.value !== false
? chartsColors.darkMode.line
: chartsColors.ligthMode.line,
}))
const textColors = computed(() => ({
color: darkMode.value
? chartsColors.darkMode.text
: chartsColors.ligthMode.text,
color:
darkMode.value !== false
? chartsColors.darkMode.text
: chartsColors.ligthMode.text,
}))
const options = computed<ChartOptions<'line'>>(() => ({