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>
<DashboardCard title="Activity Graph" :icon="BoltIcon">
<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>
</DashboardCard>
</template>

View File

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

View File

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