Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>vue-chartjs example</title>
- </head>
- <body>
- <div id="chart">
- <apexchart type="bar" height="350" :options="chartOptions" :series="series"></apexchart>
- </div>
- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
- <script>
- var options = {
- series: [{
- data: [50, 22, 10,]
- }],
- chart: {
- height: 350,
- type: 'bar',
- events: {
- click: function(chart, w, e) {
- // console.log(chart, w, e)
- }
- }
- },
- plotOptions: {
- bar: {
- columnWidth: '45%',
- distributed: true
- }
- },
- dataLabels: {
- enabled: false
- },
- legend: {
- show: false
- },
- xaxis: {
- categories: [
- ['Styczeń'],
- ['Luty'],
- ['Marzec'],
- ],
- labels: {
- style: {
- fontSize: '12px'
- }
- }
- }
- };
- var chart = new ApexCharts(document.querySelector("#chart"), options);
- chart.render();
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement