echarts-react
How to use
npm install @ailjc/echarts-react --save
Examples
import React from 'react';
import EchartsReact from '@ailjc/echarts-react';
// 指定图表的配置项和数据
const option = {
xAxis: {
data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子'],
},
yAxis: {},
series: [
{
name: '销量',
type: 'bar',
data: [5, 20, 36, 10, 10, 20],
},
],
};
const Example = () => <EchartsReact option={option} />;
export default Example;
Props
Prop | Type | Default | Description |
---|---|---|---|
option | Object | - | chart.setOption(option, notMerge, lazyUpdate); |
renderer | String | canvas | canvas or svg |
looptime | Number | - | If the looptime is passed in props, the tooltip auto play will be started |
notMerge | boolean | false | chart.setOption(option, notMerge, lazyUpdate) echarts |
lazyUpdate | boolean | false | chart.setOption(option, notMerge, lazyUpdate); echarts |