1.1.7 • Published 6 years ago
echarts-for-react-native v1.1.7
示例
/*
* 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