vue-simple-chart

1.0.3 • Public • Published

vue-simple-chart

一个基于Vue的简版chart组件,参数灵活,带已选和正确选项参数,参数个数不限。

Install

$ npm install vue-simple-chart

Usage

A basic usage

import VueSimpleChart from 'vue-simple-chart'
 
### Template
```html
<vue-simple-chart :list="list" @close="onChartClose"></vue-simple-chart>

Default Data

data () {
  return {
    list: [ // 个数不限 no limit
      {name: 'a', val: 1},
      {name: 'b', val: 28},
      {name: 'c', val: 36, selected: true},
      {name: 'd', val: 0, selected: true},
      {name: 'e', val: 88, correct: true},
    ]
  }
}

methods

methods: {
  onChartClose() {
    console.log('close chart')
  }
}

Example

$ git clone https://github.com/zhishaofei3/vue-simple-chart
$ npm install
$ npm start

Local documentation will then be available at http://localhost:8080.

Package Sidebar

Install

npm i vue-simple-chart

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

82.4 kB

Total Files

11

Last publish

Collaborators

  • zhishaofei3