2.0.1 • Published 4 years ago

p-charts v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Chart components based on AntV G2

doc gitee Travis status antv-g2-deps antv-l7-deps NPM version

GitHub stars GitHub commit activity GitHub top language GitHub license

Document

Blog

Examples

Gitee

Getting Started

installation

npm install -S p-charts
# or
yarn add p-charts

Usage

// main.js
import PCharts from 'p-charts'
Vue.use(PCharts)

p-pie

<template>
  <p-pie
    :data="PieJson"
    :options="options"
    ref="pieRef"
    @pie-title-click="handleTitleClick"
    @pie-label-click="handleLabelClick"
  />
</template>

<script>
import PieJson from './data/pie1.json'
export default {
  data() {
    return {
      PieJson,
      options: {
        fieldMap: {
          time: 'year',
          name: 'budgetSubject',
          // 统计指标,可以更换
          value: 'budgetNum'
        },
        title: `总收入和总支出占比情况-预算数(单位:万元)`,
        colorList: ['#1890ff', '#37c661']
      }
    }
  },
  methods: {
    updateData() {
      this.$refs.pieRef.initData()
    },
    handleTitleClick() {
      console.log('title-click')
    },
    handleLabelClick(data) {
      console.log('label-click', data)
    }
  }
}
</script>

Development

# install dependencies
npm install
# or
yarn

# serve with hot reload at localhost:8080
npm run dev
# or
yarn dev

# build for production with minification
npm run build
# or
yarn build
2.0.1

4 years ago

2.0.0

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.11

4 years ago

1.0.12

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago