Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 726 Bytes

README.md

File metadata and controls

49 lines (34 loc) · 726 Bytes

use-charts

📖 Description

Easily reuse your echarts charts in vue3.

📦 Install

npm install vue-use-charts

🛠️ Dependencies

Vue Echarts

🤖 Usage

import { ref } from 'vue'
import { useCharts } from 'vue-use-charts'
import { ChartDemo } from './charts/demo'

const { createChartComp } = useCharts()
const MyChart = createChartComp(ChartDemo)
const data = ref({
  // ...
})

const echartsOpts = {
  // ...
}
<template>
  <MyChart :data="data" :opts="echartsOpts" class="my-chart"/>
</template>

Thanks

License

MIT