-
Vue.js) highcharts 사용하기Programing Language/Vue.js 2021. 6. 4. 11:11728x90반응형
https://github.com/smithalan92/vue3-highcharts
smithalan92/vue3-highcharts
Vue 3 component wrapper for Highcharts.js. Contribute to smithalan92/vue3-highcharts development by creating an account on GitHub.
github.com
패키지는 해당 페이지에서 참고하고
사이트에서는 global, local component방법이있는데 필자는 local component방식으로 했다.
차트 모양은 는 반원 방식으로 하였다.
http://www.w3big.com/try/try.php?filename=highcharts_pie_semicircle_donut
Try it Yourself - pie_semicircle_donut
www.w3big.com
<template> <VueHighcharts :options="chartOptions" class="half__circle"/> </template> <script> import VueHighcharts from 'vue3-highcharts'; export default { name: "Hellow", components: { VueHighcharts, } , props: { } , data() { return { chartOptions: { title: { text: '' }, tooltip: { pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' }, plotOptions: { pie: { dataLabels: { enabled: false, }, startAngle: -90, endAngle: 90, } }, colors: ['#d7d7d7', '#76CAFF', '#6F8593', '#2F4858'], series: [{ type: 'pie', name: '', innerSize: '45%', data: [ ['1', 10.0], ['2', 20.0], ['3', 30.0], ['4', 40.0], ] }] } } } .......... </script> <style scope> .half__circle { position: absolute; display: flex; justify-content: center; align-items: center; margin-top: 60px; width: calc(100% - 40px); height: 50vh; } </style>
공식 API 문서
https://api.highcharts.com/highcharts/annotations.animation
Highcharts API Option: annotations.animation
Enable or disable the initial animation when a series is displayed for the annotation.
api.highcharts.com
728x90반응형'Programing Language > Vue.js' 카테고리의 다른 글
Vue) 사용자 지정 디렉티브 사용하여 image lazy loading 구현하기 (0) 2021.10.25 Vue.js) Unexpected mutation of "" prop 에러 원인 분석 (0) 2021.06.08 Vue.js) 카카오 로그인 api 구현하기 (0) 2021.06.02 Vue.js) 네이버 로그인(네아로) api 구현하기 (0) 2021.06.02 Vue.js) 구글 로그인 api 구현하기 (2) (2) 2021.06.02