@jimengio/echarts-autofit
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

ECharts Autofit

A React wrapper over ECharts.

Demo http://fe.jimu.io/echarts-autofit/

Usage

Notice, create a container element to define the width/height for the chart!

import EChartAutofit from "@jimengio/echarts-autofit";

<div className={styleArea}>
  <EChartAutofit options={chartOptions} />
</div>;

let styleArea = css`
  margin-top: 100px;
  width: 80%;
  height: 400px;
  background-color: hsl(200, 70%, 50%, 0.1);
`;

SVG renderer:

<JMEChart className={height100Percent} options={this.getChartOption()} renderer="svg" />

Bind events:

<JMEChart options={this.options} events={{ click: this.onChartClick }} />

Do something when chart instance is ready:

<JMEChart options={this.getOptions()} onReady={this.onReady} />;

onReady = (chart: ECharts) => {
  this.chart = chart;
};

Workflow

https://github.com/jimengio/ts-workflow

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @jimengio/echarts-autofit

Weekly Downloads

2

Version

0.1.3

License

ISC

Unpacked Size

28 kB

Total Files

7

Last publish

Collaborators

  • imzshh
  • jiyinyiyong
  • rebirth