Fuck TS
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
||||||
import {onMounted} from "vue";
|
import {onMounted} from "vue";
|
||||||
import {Chart} from "chart.js/auto";
|
import {Chart, type ChartItem} from "chart.js/auto";
|
||||||
import {Event} from "@/models/Event.ts";
|
import {Event} from "@/models/Event.ts";
|
||||||
|
|
||||||
|
|
||||||
@@ -18,8 +18,9 @@ onMounted(() => {
|
|||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
const ctx = document.getElementById('myChart');
|
const ctx = document.getElementById('myChart');
|
||||||
|
if(!ctx) return;
|
||||||
|
|
||||||
new Chart(ctx, {
|
new Chart(ctx as ChartItem, {
|
||||||
type: 'doughnut',
|
type: 'doughnut',
|
||||||
data : {
|
data : {
|
||||||
labels: data.dates,
|
labels: data.dates,
|
||||||
|
|||||||
Reference in New Issue
Block a user