# vue-echarts-plugin

> a custom plugin for using Echarts in Vue.js(v2/3) apps.

Latest version **0.0.8** (published 2022-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-echarts-plugin
pnpm add vue-echarts-plugin
yarn add vue-echarts-plugin
bun add vue-echarts-plugin
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2022-05-07 |
| First published | 2022-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | tim760255458 |
| Maintainers | tim760255458 |
| Keywords | vue, echarts |

## Links

- npm: https://www.npmjs.com/package/vue-echarts-plugin
- Repository: https://github.com/tim760255458/vue-echarts-plugin
- Homepage: https://github.com/tim760255458/vue-echarts-plugin/blob/master/README.md
- Issues: https://github.com/tim760255458/vue-echarts-plugin/issues
- npm.io page: https://npm.io/package/vue-echarts-plugin

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^3.2.25
- [echarts](https://npm.io/package/echarts.md) ^5.3.2

## 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

- 0.0.8 (latest) — 2022-05-07
- 0.0.6 — 2022-04-12
- 0.0.5 — 2022-04-11
- 0.0.4 — 2022-04-05
- 0.0.3 — 2022-04-05
- 0.0.2 — 2022-04-05
- 0.0.1 — 2022-04-05

## README

# vue-eharts-plugin

a custom plugin for using Echarts in Vue.js(v2/3) apps.

# Usage

vue3

```javascript
// main.js
import * as echarts from 'echarts'
import VueEchartsPlugin from 'vue-echarts-plugin'

app.use(VueEchartsPlugin, { echarts, ... })
```

vue2

```javascript
// main.js
import Vue from 'vue'
import * as echarts from 'echarts'
import VueEchartsPlugin from 'vue-echarts-plugin'

Vue.use(VueEchartsPlugin, { echarts, ... })
```

use in sfc

```javascript
<template>
  <div v-chart="echartOption" ref="chart"></div>
</template>

// You can get the instance this way
// vue2
<script>
  export default {
    data: () => ({
      echartOption: {...}
    })
    mounted() {
      this.$refs.chart.echartsInstance
    }
  }
</script>

// vue3
<script setup>
  const echartOption = reactive({...})
  const chart = ref()
  onMounted(() => chart.echartsInstance)
</script>
```

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