CrmTotalSales.vue
1.94 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<script setup>
import { useTheme } from 'vuetify'
import { hexToRgb } from '@core/utils/colorConverter'
const vuetifyTheme = useTheme()
const options = computed(() => {
const currentTheme = ref(vuetifyTheme.current.value.colors)
const variableTheme = ref(vuetifyTheme.current.value.variables)
const secondaryTextColor = `rgba(${ hexToRgb(currentTheme.value['on-surface']) },${ variableTheme.value['medium-emphasis-opacity'] })`
return {
chart: {
parentHeightOffset: 0,
toolbar: { show: false },
},
fill: {
type: 'gradient',
gradient: {
opacityTo: 0.2,
opacityFrom: 1,
shadeIntensity: 0,
type: 'horizontal',
stops: [
0,
100,
100,
],
},
},
stroke: {
width: 5,
curve: 'smooth',
lineCap: 'round',
},
legend: { show: false },
colors: [currentTheme.value.success],
grid: {
show: false,
padding: {
left: 0,
right: 0,
bottom: -10,
},
},
xaxis: {
axisTicks: { show: false },
axisBorder: { show: false },
categories: [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
],
labels: { style: { colors: secondaryTextColor } },
},
yaxis: { labels: { show: false } },
tooltip: { enabled: false },
}
})
const series = [{
name: 'Total Sales',
data: [
0,
258,
30,
240,
150,
400,
],
}]
</script>
<template>
<VCard>
<VCardItem>
<VCardTitle class="mb-1">
Total Sales
</VCardTitle>
<VCardSubtitle>$21,845</VCardSubtitle>
<template #append>
<div class="mt-n7 me-n3">
<MoreBtn />
</div>
</template>
</VCardItem>
<VCardText>
<VueApexCharts
type="line"
:options="options"
:series="series"
:height="206"
/>
</VCardText>
</VCard>
</template>