All Projects → ambit-tsai → Echarts For Vue

ambit-tsai / Echarts For Vue

Licence: apache-2.0
📊📈 ECharts wrapper component for Vue 3 and 2

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Echarts For Vue

Echarts Php
Echarts-PHP a PHP library that works as a wrapper for the Echarts js library
Stars: ✭ 253 (+502.38%)
Mutual labels:  chart, echarts
React Echarts V3
React.js(v16.x+) component wrap for ECharts.js(v3.x+)
Stars: ✭ 48 (+14.29%)
Mutual labels:  chart, echarts
React Component Echarts
React component echarts. 组件式百度图表。
Stars: ✭ 175 (+316.67%)
Mutual labels:  chart, echarts
datart
Datart is a next generation Data Visualization Open Platform
Stars: ✭ 1,042 (+2380.95%)
Mutual labels:  chart, echarts
Angular Echarts
💹 angularjs bindings for baidu echarts
Stars: ✭ 367 (+773.81%)
Mutual labels:  chart, echarts
Echarts For Weixin
Apache ECharts (incubating) 的微信小程序版本
Stars: ✭ 5,479 (+12945.24%)
Mutual labels:  chart, echarts
Flutter echarts
A Flutter widget to use Apache ECharts (incubating) in a reactive way.
Stars: ✭ 420 (+900%)
Mutual labels:  chart, echarts
Vue Echarts V3
Vue.js(v2.x+) component wrap for ECharts.js(v3.x+)
Stars: ✭ 884 (+2004.76%)
Mutual labels:  chart, echarts
Samples Viewer Generator
🎉 A CLI utility tool to generate web app of data visualization samples for presentation purpose
Stars: ✭ 13 (-69.05%)
Mutual labels:  chart
Pomerium Helm
Official helm charts for Pomerium.
Stars: ✭ 32 (-23.81%)
Mutual labels:  chart
Echarts Liquidfill
Liquid Fill Chart for Apache ECharts (incubating)
Stars: ✭ 872 (+1976.19%)
Mutual labels:  echarts
Timesheet.js
JavaScript library for HTML5 & CSS3 time sheets
Stars: ✭ 6,881 (+16283.33%)
Mutual labels:  chart
Smarthome
💡 智能电器管理综合系统
Stars: ✭ 33 (-21.43%)
Mutual labels:  echarts
Ilg
because the world needs another iOS chart library.
Stars: ✭ 13 (-69.05%)
Mutual labels:  chart
Angular4 Admin Front
Admin system front based on Angular. 基于Angular4的后台管理系统(no longer maintain)
Stars: ✭ 36 (-14.29%)
Mutual labels:  echarts
D3 Spotmatrix
Open Source Javascript Library to render Spot Matrix Charts using D3.js
Stars: ✭ 12 (-71.43%)
Mutual labels:  chart
Morris Php
A PHP model and useful class for Morris.js project
Stars: ✭ 11 (-73.81%)
Mutual labels:  chart
D3 In Motion
Code examples and references for the course "D3.js in Motion"
Stars: ✭ 37 (-11.9%)
Mutual labels:  chart
Luckysheet
Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.
Stars: ✭ 9,772 (+23166.67%)
Mutual labels:  chart
Catchart
Pipe something from command line to a chart in the browser
Stars: ✭ 27 (-35.71%)
Mutual labels:  chart

简体中文 | English

ECharts For Vue  Version

📊📈 ECharts wrapper component for Vue 3 and 2

Features

  1. Support for Vue 3 and 2;
  2. Conform to the habits of Vue and ECharts users;
  3. Provide pure function API, no side effects;
  4. Lightweight encapsulation, easy to use;
  5. Support auto resize;

Install

npm i -S echarts-for-vue

Usage

  1. Vue 3
import { createApp, h } from 'vue';
import * as echarts from 'echarts';
import { plugin } from 'echarts-for-vue';

const app = createApp({ /*...*/ });
app.use(plugin, { echarts, h });                        // use as a plugin
<template>
    <ECharts ref="chart" :option="option" />
</template>

<script>
    import * as echarts from 'echarts';
    import { h } from 'vue';
    import { createComponent } from 'echarts-for-vue';

    export default {
        components: {
            ECharts: createComponent({ echarts, h }),   // use as a component
        },
        data() {
            return {
                option: { /*...*/ },
            };
        },
        methods: {
            doSomething() {
                this.$refs.chart.inst.getWidth();       // call the method of ECharts instance
            },
        },
    }
</script>
  1. Vue 2
import Vue from 'vue';
import * as echarts from 'echarts';
import { plugin } from 'echarts-for-vue';

Vue.use(plugin, { echarts });                           // use as a plugin
<template>
    <ECharts ref="chart" :option="option" />
</template>

<script>
    import * as echarts from 'echarts';
    import { createComponent } from 'echarts-for-vue';

    export default {
        components: {
            ECharts: createComponent({ echarts }),      // use as a component
        },
        data() {
            return {
                option: { /*...*/ },
            };
        },
        methods: {
            doSomething() {
                this.$refs.chart.inst.getWidth();       // call the method of ECharts instance
            },
        },
    }
</script>
  1. More examples
  2. Online demo

Global API

Definition Return Description
createComponent(initialOptions: object): object Component definition object Create a component
plugin(app: Vue, initialOptions: object): void The installation method of plugin

initialOptions

Property Type Default Optional Description
echarts object The global object of ECharts library
h function The method createElement of Vue (Required for Vue 3)
ResizeObserver function window.ResizeObserver When the global ResizeObserver doesn't exist, the polyfill provides support
name string "ECharts" The registered name of the component

Instance Properties

Name Type ReadOnly Description
inst object ECharts instance

props

Name Type Default Reactive Description
initTheme object | string The parameter theme of echarts.init method, see
initOpts object The parameter opts of echarts.init method, see
loading boolean false Shows loading animation
loadingType string "default" The parameter type of ECharts instance method showLoading, see
loadingOpts object The parameter opts of ECharts instance method showLoading, see
option object The parameter option of ECharts instance method setOption, see
setOptionOpts object The parameter opts of ECharts instance method setOption, see
events Arguments[] An array element is the arguments of ECharts instance method on, see
autoResize boolean true Auto resize (Based on ResizeObserver, forward compatibility via polyfill)

Beyond the props above, the remaining properties are passed to the root element of the component, such as style, class or onclick

methods

Definition Description
setOption(option: object, opts: object): void Call the method setOption of ECharts instance, see
resize(): void Resize chart (Based on the size of root element)
addResizeListener(): void Add "resize" listener
removeResizeListener(): void Remove "resize" listener

Contact

  1. WeChat: ambit_tsai
  2. QQ Group: 663286147
  3. E-mail: [email protected]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].