@vis-pilot/runtime
v0.1.0
Published
Browser runtime wrapper for vis-pilot based on ECharts.
Readme
@vis-pilot/runtime
Browser runtime wrapper for vis-pilot based on ECharts.
Usage
import { VisPilot } from '@vis-pilot/runtime'
const container = document.getElementById('chart') as HTMLDivElement
const pilot = new VisPilot(container, 'dark')
pilot.render({
mode: 'text',
input: `
chart: line
title: Runtime Demo
x: month
y: value
data:
- month: Jan
value: 120
- month: Feb
value: 150
- month: Mar
value: 170
`
})
pilot.appendData([{ month: 'Apr', value: 190 }])
window.addEventListener('beforeunload', () => {
pilot.dispose()
})