效果图:
安装:
cnpm install --save @antv/g2
使用:
首先,在<template></template>中写入:
<div id="barG2"></div>
其次,在<script></script>中写入:
<script>
import G2 from '@antv/g2'
export default {
name: 'antv',
mounted () {
let that = this
// @antv/g2
const data = [
{
'name': 'London',
'month': 'Jan.',
'number': 18.9
}, {
'name': 'London',
'month': 'Feb.',
'number': 28.8
}, {