Files
mykopkb-fe/src/components/chart-presets/Line3.vue
T
ISMAIL MASSERAN df0d0e743b first init
2026-06-08 11:37:14 +08:00

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>