安卓真机(huawei)和模拟器图表不显示
Closed this issue · 1 comments
wms718 commented
react-native-echarts-pro【1.8.9】
react-native version【0.70.5】
react-native-webview 【11.25.0】
Platform【android】
真机系统版本:安卓6
运行react-native-echarts-pro文档实例中的代码图表不显示(webview是可以正常加载网页的):
import React from "react";
import { View } from "react-native";
import RNEChartsPro from "react-native-echarts-pro";
export default function RNEPDemo() {
const pieOption = {
series: [
{
name: "Source",
type: "pie",
legendHoverLink: true,
hoverAnimation: true,
avoidLabelOverlap: true,
startAngle: 180,
radius: "55%",
center: ["50%", "35%"],
data: [
{ value: 105.2, name: "android" },
{ value: 310, name: "iOS" },
{ value: 234, name: "web" },
],
label: {
normal: {
show: true,
textStyle: {
fontSize: 12,
color: "#23273C",
},
},
},
},
],
};
return (
<View style={{ height: 300, paddingTop: 25 , backgroundColor:'white'}}>
<RNEChartsPro height={250} option={pieOption} />
</View>
);
}
supervons commented
感谢反馈,已定位到问题,Android 6
版本浏览器内核对于 ES6
语法支持不全。
目前考虑使用 babel
进行转义,预计下个版本修复;