generated from antfu-collective/vitesse
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BarChart.vue
81 lines (76 loc) · 1.28 KB
/
BarChart.vue
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
<script setup>
import { ref } from 'vue'
import VueApexCharts from 'vue3-apexcharts'
const chartOptions = ref({
chart: {
stacked: true,
type: 'bar',
toolbar: {
show: false,
},
},
grid: {
padding: {
top: -20,
bottom: -10,
},
yaxis: {
lines: {
show: false,
},
},
},
xaxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
labels: {
style: {
colors: '#6E6B7B',
fontSize: '0.86rem',
},
},
axisTicks: {
show: false,
},
axisBorder: {
show: false,
},
},
legend: {
show: false,
},
dataLabels: {
enabled: false,
},
colors: ['var(--primary-color)', 'var(--primary-color-shade1)'],
plotOptions: {
bar: {
columnWidth: '17%',
borderRadius: 5,
},
distributed: true,
},
yaxis: {
labels: {
style: {
colors: '#6E6B7B',
fontSize: '0.86rem',
},
},
},
})
const series = ref([
{
name: 'series-1',
data: [30, 40, 35, 50, 49, 6, 70],
},
{
name: 'series-2',
data: [3, 4, 15, 5, 4, 60, 10],
},
])
</script>
<template>
<VueApexCharts type="bar" :options="chartOptions" height="460" :series="series" />
</template>
<style lang="scss" scoped>
</style>