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]
|
() => store.getters[ROOT_STORE.GETTERS.DARK_MODE]
|
||||||
)
|
)
|
||||||
const lineColors = computed(() => ({
|
const lineColors = computed(() => ({
|
||||||
color: darkMode.value
|
color:
|
||||||
? chartsColors.darkMode.line
|
darkMode.value !== false
|
||||||
: chartsColors.ligthMode.line,
|
? chartsColors.darkMode.line
|
||||||
|
: chartsColors.ligthMode.line,
|
||||||
}))
|
}))
|
||||||
const textColors = computed(() => ({
|
const textColors = computed(() => ({
|
||||||
color: darkMode.value
|
color:
|
||||||
? chartsColors.darkMode.text
|
darkMode.value !== false
|
||||||
: chartsColors.ligthMode.text,
|
? chartsColors.darkMode.text
|
||||||
|
: chartsColors.ligthMode.text,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const chartData = computed(() => ({
|
const chartData = computed(() => ({
|
||||||
|
@ -118,14 +118,16 @@
|
|||||||
() => datasets.value.coordinates
|
() => datasets.value.coordinates
|
||||||
)
|
)
|
||||||
const lineColors = computed(() => ({
|
const lineColors = computed(() => ({
|
||||||
color: darkMode.value
|
color:
|
||||||
? chartsColors.darkMode.line
|
darkMode.value !== false
|
||||||
: chartsColors.ligthMode.line,
|
? chartsColors.darkMode.line
|
||||||
|
: chartsColors.ligthMode.line,
|
||||||
}))
|
}))
|
||||||
const textColors = computed(() => ({
|
const textColors = computed(() => ({
|
||||||
color: darkMode.value
|
color:
|
||||||
? chartsColors.darkMode.text
|
darkMode.value !== false
|
||||||
: chartsColors.ligthMode.text,
|
? chartsColors.darkMode.text
|
||||||
|
: chartsColors.ligthMode.text,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const options = computed<ChartOptions<'line'>>(() => ({
|
const options = computed<ChartOptions<'line'>>(() => ({
|
||||||
|
Loading…
Reference in New Issue
Block a user