Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安卓真机(huawei)和模拟器图表不显示 #86

Closed
wms718 opened this issue Dec 3, 2022 · 1 comment
Closed

安卓真机(huawei)和模拟器图表不显示 #86

wms718 opened this issue Dec 3, 2022 · 1 comment

Comments

@wms718
Copy link

wms718 commented Dec 3, 2022

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>
  );
}

效果如下:
image

@supervons
Copy link
Owner

感谢反馈,已定位到问题,Android 6 版本浏览器内核对于 ES6 语法支持不全。

目前考虑使用 babel 进行转义,预计下个版本修复;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants