83 lines
1.9 KiB
Vue
83 lines
1.9 KiB
Vue
<script lang="ts" setup>
|
|
import { Chart, getColor } from '@/components/ui/chart'
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<Chart
|
|
:config="{
|
|
type: 'line',
|
|
data: {
|
|
labels: [
|
|
'Jan',
|
|
'Feb',
|
|
'Mar',
|
|
'Apr',
|
|
'May',
|
|
'Jun',
|
|
'Jul',
|
|
'Aug',
|
|
'Sep',
|
|
'Oct',
|
|
'Nov',
|
|
'Dec',
|
|
],
|
|
datasets: [
|
|
{
|
|
label: '# of Votes',
|
|
data: [0, 200, 250, 200, 700, 550, 650, 1050, 950, 1100, 900, 1200],
|
|
borderWidth: 1,
|
|
borderColor: () => getColor('--color-primary', 0.8),
|
|
backgroundColor: 'transparent',
|
|
pointBorderColor: 'transparent',
|
|
tension: 0.4,
|
|
},
|
|
{
|
|
label: '# of Votes',
|
|
data: [0, 300, 400, 560, 320, 600, 720, 850, 690, 805, 1200, 1010],
|
|
borderDash: [2, 2],
|
|
borderWidth: 1,
|
|
borderColor: () => getColor('--color-foreground', 0.8),
|
|
backgroundColor: 'transparent',
|
|
pointBorderColor: 'transparent',
|
|
tension: 0.4,
|
|
},
|
|
],
|
|
},
|
|
options: {
|
|
maintainAspectRatio: false,
|
|
plugins: {
|
|
legend: {
|
|
display: false,
|
|
},
|
|
},
|
|
scales: {
|
|
x: {
|
|
ticks: {
|
|
display: false,
|
|
},
|
|
grid: {
|
|
display: false,
|
|
},
|
|
border: {
|
|
display: false,
|
|
},
|
|
},
|
|
y: {
|
|
ticks: {
|
|
display: false,
|
|
},
|
|
grid: {
|
|
display: false,
|
|
},
|
|
border: {
|
|
display: false,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}"
|
|
/>
|
|
</div>
|
|
</template>
|