echarts-for-react-native

1.1.7 • Public • Published

示例

/*
* option 渲染参数
* height 高度
* renderType 默认canvas渲染  如果想用svg渲染  传"svg"
* */
import Echarts from "echarts-for-react-native";
import { View } from "react-native";

export default class App extends React.Component {
  render() {
    const option = {
      xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
      },
      yAxis: {
        type: 'value',
      },
      series: [
        {
          data: [820, 932, 901, 934, 1290, 1330, 1320],
          type: 'line',
        },
      ],
    };
    return (
      <View style={styles.container}>
        <Echarts option={option} height={350} renderType={"svg"} />
      </View>
    );
  }
}

如有问题 请联系钉钉: veveue

Package Sidebar

Install

npm i echarts-for-react-native

Weekly Downloads

2

Version

1.1.7

License

ISC

Unpacked Size

750 kB

Total Files

11

Last publish

Collaborators

  • veveue