CardStatisticsTotalRevenueLineCharts.vue
1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<script setup>
import { useTheme } from 'vuetify'
const vuetifyTheme = useTheme()
const series = [{
data: [
28,
58,
40,
68,
],
}]
const chartOptions = computed(() => {
const currentTheme = vuetifyTheme.current.value.colors
return {
grid: {
show: false,
padding: {
left: -2,
top: -10,
},
},
chart: {
parentHeightOffset: 0,
type: 'line',
offsetX: -8,
dropShadow: {
enabled: true,
top: 10,
blur: 4,
color: currentTheme.primary,
opacity: 0.09,
},
toolbar: { show: false },
},
markers: {
size: 6,
colors: 'transparent',
strokeColors: 'transparent',
strokeWidth: 4,
discrete: [{
seriesIndex: 0,
dataPointIndex: series[0].data.length - 1,
fillColor: currentTheme.surface,
strokeColor: currentTheme.primary,
size: 6,
}],
hover: { size: 7 },
},
stroke: {
width: 5,
curve: 'smooth',
lineCap: 'round',
},
xaxis: {
axisBorder: { show: false },
axisTicks: { show: false },
labels: { show: false },
},
yaxis: { labels: { show: false } },
tooltip: { enabled: false },
colors: [currentTheme.primary],
}
})
</script>
<template>
<VCard>
<VCardText>
<h4 class="text-h4">
$35.4k
</h4>
<VueApexCharts
:options="chartOptions"
:series="series"
:height="110"
/>
<h6 class="text-h6 text-center">
Total Revenue
</h6>
</VCardText>
</VCard>
</template>