Client - fix dark mode on chart when browser preferences
This commit is contained in:
parent
cc829b412a
commit
e8e79a42dc
@ -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(() => ({
|
||||
|
@ -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'>>(() => ({
|
||||
|
Loading…
Reference in New Issue
Block a user