<template>
<div>
<div id="chart">
<apexchart
type="bar"
height="350"
:options="chartOptions"
:series="series"
></apexchart>
</div>
</div>
</template>
<script>
import VueApexCharts from 'vue-apexcharts'
export default {
components: {
apexchart: VueApexCharts,
},
data: function () {
return {
series: [
{
name: 'Visitors',
data: [400, 430, 448, 470, 540, 580, 690, 1100, 1200, 1380],
},
],
chartOptions: {
chart: {
type: 'bar',
height: 350,
},
plotOptions: {
bar: {
borderRadius: 4,
borderRadiusApplication: 'end',
horizontal: true,
},
},
dataLabels: {
enabled: false,
},
title: {
text: 'Monthly Visitors by Country',
align: 'left',
},
xaxis: {
categories: [
'South Korea',
'Canada',
'United Kingdom',
'Netherlands',
'Italy',
'France',
'Japan',
'United States',
'China',
'Germany',
],
labels: {
formatter: function (val) {
return val + 'k'
},
},
},
},
}
},
}
</script>
<style>
#chart {
max-width: 650px;
margin: 35px auto;
}
</style>