@jimengio/echarts-autofit
v0.1.3
Published
> A React wrapper over ECharts.
Downloads
29
Readme
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