0.0.8 • Published 11 months ago

echarts-worker v0.0.8

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

ECharts Worker

This package allows you to run your Apache ECharts instance inside a web worker.

Installation

npm install echarts-worker
yarn add echarts-worker
pnpm add echarts-worker

Usage

The package does not include the echarts package as it is being imported from jsdelivr inside the Worker. Besides this, usage should be identical to the regular echarts package except that the first argument of the init function has to be an HTMLCanvasElement to transfer it off-screen;

import { init } from 'echarts-worker'

const canvas = document.querySelector('canvas')

const instance = init(canvas)

instance.setOption({ ...options })

instance.on('click', (event) => {
    // do something
})

instance.off('click')

instance.resize({ width: 100, height: 100 })
0.0.8

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

12 months ago

0.0.1

12 months ago