# vue-chart-js

> Chart.js for VueJs.

Latest version **1.4.1** (published 2017-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-chart-js
pnpm add vue-chart-js
yarn add vue-chart-js
bun add vue-chart-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2017-09-25 |
| First published | 2017-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kevin Ongko |
| Maintainers | kevinongko |
| Keywords | chart, chart.js, wrapper, vue, vue.js |

## Links

- npm: https://www.npmjs.com/package/vue-chart-js
- Repository: https://github.com/kevinongko/vue-chart-js
- Homepage: https://github.com/kevinongko/vue-chart-js#readme
- Issues: https://github.com/kevinongko/vue-chart-js/issues
- npm.io page: https://npm.io/package/vue-chart-js

## Dependencies (1)

- [chart.js](https://npm.io/package/chart.js.md) ^2.6.0

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 1.4.1 (latest) — 2017-09-25
- 1.4.0 — 2017-09-24
- 1.3.0 — 2017-08-10
- 1.2.1 — 2017-08-10
- 1.2.0 — 2017-08-06
- 1.1.0 — 2017-06-06
- 1.0.0 — 2017-02-13

## README

# vue-chart-js

[![npm](https://img.shields.io/npm/v/vue-chart-js.svg)](https://www.npmjs.com/package/vue-chart-js)
[![npm](https://img.shields.io/npm/dt/vue-chart-js.svg)](https://www.npmjs.com/package/vue-chart-js)
[![npm](https://img.shields.io/npm/dm/vue-chart-js.svg)](https://www.npmjs.com/package/vue-chart-js)
[![npm](https://img.shields.io/npm/l/vue-chart-js.svg)](http://opensource.org/licenses/MIT)

[Chart.js](http://www.chartjs.org/) wrapper component based on [Vue](https://vuejs.org/).

**Works with Vue 2.***

## Installation

### Install via CDN
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.min.js"></script>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vue-chart-js"></script>

<script>
  Vue.use(VueChart.default)
</script>
```
### Install via NPM
```sh
$ npm install vue-chart-js --save
```

#### Register as Component
```js
import Vue from 'vue'
import VueChart from 'vue-chart-js'

export default {
  name: 'App',

  components: {
    VueChart
  }
}
```

#### Register as Plugin
```js
import Vue from 'vue'
import VueChart from 'vue-chart-js'

Vue.use(VueChart)
```

## Usage

```vue
<template>
  <vue-chart type="bar" :data="chartData"></vue-chart>
</template>

<script>
import VueChart from 'vue-chart-js'

export default {
  name: 'App',

  components: {
    VueChart
  },

  data: () => ({
    chartData: {
        labels: ['Item 1', 'Item 2', 'Item 3'],
        datasets: [
            {
                label: 'Component 1',
                data: [10, 20, 30]
            },
            {
                label: 'Component 2',
                data: [20, 30, 40]
            }
        ]
    }
  }),
}
</script>

```

## Props
|Props|Description|Type|Required|
|-----|-----------|----|--------|
|type|Chart.js type|String|true|
|data|Chart.js datasets|Object|true|
|options|Chart.js options|Object|false|
|width|Chart width|Number|false|
|height|Chart height|Number|false|

## License

Vue-Chart-Js is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/vue-chart-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
