Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 1 addition & 23 deletions app/components/Package/DownloadAnalytics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,9 @@ const rootEl = shallowRef<HTMLElement | null>(null)

const { width } = useElementSize(rootEl)

const chartKey = ref(0)

let chartRemountTimeoutId: ReturnType<typeof setTimeout> | null = null

onMounted(() => {
rootEl.value = document.documentElement
resolvedMode.value = colorMode.value === 'dark' ? 'dark' : 'light'

// If the chart is painted too early, built-in auto-sizing does not adapt to the final container size
chartRemountTimeoutId = setTimeout(() => {
chartKey.value += 1
chartRemountTimeoutId = null
}, 10)
})

onBeforeUnmount(() => {
if (chartRemountTimeoutId !== null) {
clearTimeout(chartRemountTimeoutId)
chartRemountTimeoutId = null
}
})

const { colors } = useCssVariables(
Expand Down Expand Up @@ -705,12 +688,7 @@ const config = computed(() => {
</div>

<ClientOnly v-if="inModal && chartData.dataset">
<VueUiXy
:dataset="chartData.dataset"
:config="config"
class="[direction:ltr]"
:key="chartKey"
>
<VueUiXy :dataset="chartData.dataset" :config="config" class="[direction:ltr]">
<template #menuIcon="{ isOpen }">
<span v-if="isOpen" class="i-carbon:close w-6 h-6" aria-hidden="true" />
<span v-else class="i-carbon:overflow-menu-vertical w-6 h-6" aria-hidden="true" />
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"vite-plugin-pwa": "1.2.0",
"vite-plus": "0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab",
"vue": "3.5.27",
"vue-data-ui": "3.13.7"
"vue-data-ui": "3.14.0"
},
"devDependencies": {
"@npm/types": "2.1.0",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading