Skip to content

Commit

Permalink
fix: responsive credits chart width
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Sep 11, 2024
1 parent 3d75984 commit 52f5481
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion components/CreditsChart.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template>
<Chart type="line" :data="chartData" :options="chartOptions" class="h-30rem"/>
<div class="credits-chart">
<Chart type="line" :data="chartData" :options="chartOptions" class="h-40"/>
</div>
</template>

<script setup lang="ts">
Expand Down Expand Up @@ -185,3 +187,11 @@ Spent: ${changes.value[ctx[0].dataIndex].spent.toLocaleString('en-US')}`,
},
}));
</script>

<style>
/* https://github.com/chartjs/Chart.js/issues/11005 */
.credits-chart canvas {
width: 100% !important;
height: 100% !important;
}
</style>

0 comments on commit 52f5481

Please sign in to comment.