【发布时间】:2019-07-20 03:22:48
【问题描述】:
我已将融合图表集成到我在 React Native 中的应用程序中。对于 iOS,它工作正常,但是,在 android 中,当我尝试显示图形时,它在 UI 中显示 html 内容。
我已从 github 页面正确执行安装步骤。
//头声明
const fusionChartiOSPath = require('../assets/fusioncharts.html');
const fusionChartAndroidPath = { uri: 'file:///android_asset/fusioncharts.html' };
//渲染方法
<FusionCharts
type={type}
width={width}
height={height}
dataFormat={dataFormat}
dataSource={dataSource}
containerBackgroundColor={containerBackgroundColor}
libraryPath={
Platform.OS === 'ios'
? fusionChartiOSPath
: fusionChartAndroidPath
}
/>
但是,在 UI 中它的显示就像
<!DOCTYPE html>
<html>
....
谁能建议我,我在哪里做错了?
【问题讨论】:
标签: android react-native graph fusioncharts