Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/SeregPie/VueChart

A simple wrapper for Chart.js.
https://github.com/SeregPie/VueChart

Last synced: about 2 months ago
JSON representation

A simple wrapper for Chart.js.

Lists

README

        

# VueChart

A simple wrapper for Chart.js.

Works for Vue 2 & 3.

## dependencies

- [VueDemi](https://github.com/antfu/vue-demi)

## setup

### npm

```shell
npm i @seregpie/vue-chart
```

---

```javascript
import VueChart from '@seregpie/vue-chart';
```

### browser

```html

```

The module is globally available as `VueChart`.

## usage

Register the component globally.

```javascript
import {createApp} from 'vue';
import VueChart from '@seregpie/vue-chart';

let app = createApp({/*...*/});
app.component(VueChart.name, VueChart);
app.mount('body');
```

*or*

Register the component locally.

```javascript
import VueChart from '@seregpie/vue-chart';

export default {
components: {
VueChart,
},
// ...
};
```

---

```html

```

## properties

| name | type | description |
| ---: | :--- | :--- |
| `data` | `Object` | The data of the chart. |
| `options` | `Object` | The configuration options of the chart of the current type. |
| `type` | `String` | The type of the chart. Changing the value will recreate the chart. |
| `updateMode` | `String` | The mode for the update process. |