Skip to content

Commit 75cd05f

Browse files
- FIX: Fixed some issues with chart axis titles not updating when locale is changed.
1 parent 0a106bd commit 75cd05f

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/components/chart/BaseChart.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import { coreStore } from '@/stores/app'
4949
import { mdiChartAreaspline, mdiDotsVertical, mdiFileCode, mdiFileDocument, mdiFileImage } from '@mdi/js'
5050
import Plotly from 'plotly.js/lib/core'
51+
import { useI18n } from 'vue-i18n'
5152
5253
const emit = defineEmits(['update:loading', 'force-redraw'])
5354
@@ -80,6 +81,7 @@
8081
})
8182
8283
const store = coreStore()
84+
const { locale } = useI18n()
8385
8486
const localLoading = ref(false)
8587
const interactive = defineModel('interactive')
@@ -125,7 +127,7 @@
125127
}
126128
127129
watch(() => store.storeIsDarkMode, async () => nextTick(() => emit('force-redraw')))
128-
watch(() => store.storeLocale, async () => nextTick(() => emit('force-redraw')))
130+
watch(locale, async () => nextTick(() => emit('force-redraw')))
129131
130132
watch(interactive, async newValue => {
131133
const element = document.querySelector(`#${compProps.chartId}`)

src/components/chart/CalendarHeatmap.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<script setup lang="ts">
2323
import { getPrimaryColor } from '@/plugins/color'
24-
import type { DownloadBlob } from '@/plugins/file'
24+
import type { DownloadBlob } from '@/plugins/file'
2525
import { getId } from '@/plugins/id'
2626
import type { TrialPlus } from '@/plugins/types/client'
2727
import { toLocalDateString } from '@/plugins/util'
@@ -114,8 +114,9 @@ import type { DownloadBlob } from '@/plugins/file'
114114
const y = months.value.concat()
115115
116116
if (isHorizontal.value) {
117+
const copy = z.concat().reverse()
117118
// @ts-ignore
118-
z = z[0].map((col, i) => z.reverse().map(row => row[i]))
119+
z = z[0].map((col, i) => copy.map(row => row[i]))
119120
}
120121
121122
const data = [{

0 commit comments

Comments
 (0)