add automatic resizing to all charts, so they update on window resize

This commit is contained in:
Gregor Vostrak
2024-04-29 18:49:48 +02:00
parent b910662ae1
commit f3b3dbb6d8
3 changed files with 7 additions and 3 deletions

View File

@@ -103,7 +103,11 @@ const option = ref({
<template> <template>
<DashboardCard title="Activity Graph" :icon="BoltIcon"> <DashboardCard title="Activity Graph" :icon="BoltIcon">
<div class="px-2"> <div class="px-2">
<v-chart class="chart" :option="option" style="height: 260px" /> <v-chart
:autoresize="true"
class="chart"
:option="option"
style="height: 260px" />
</div> </div>
</DashboardCard> </DashboardCard>
</template> </template>

View File

@@ -94,7 +94,7 @@ const option = ref({
</script> </script>
<template> <template>
<v-chart class="chart" :option="option" /> <v-chart class="chart" :autoresize="true" :option="option" />
</template> </template>
<style scoped> <style scoped>

View File

@@ -165,7 +165,7 @@ const option = ref({
title="This Week" title="This Week"
class="pb-8" class="pb-8"
:icon="ClockIcon"></CardTitle> :icon="ClockIcon"></CardTitle>
<v-chart class="chart" :option="option" /> <v-chart :autoresize="true" class="chart" :option="option" />
</div> </div>
<div class="space-y-6"> <div class="space-y-6">
<StatCard <StatCard