对本机项目反应本机Fusionchart

时间:2020-03-28 08:49:59

标签: expo

我现在在我的博览会项目中使用react native Fusionchart。

 <FusionCharts
              type='column2d'
              width='100%'
              height='200'
              dataFormat='json'
              dataSource={this.state.dataSource}
              libraryPath={this.libraryPath} // set the libraryPath property
            />

在这里this.libraryPath = require('../../assets/fusioncharts-tpl.html');

然后我在项目的资产文件夹中添加了fusioncharts-tpl.html

在package.json文件中,我添加了 "build:assets": "fc-build-assets --fc-template ./assets/fusioncharts-tpl.html"

npm run build:assets,它就建立了。 然后使用npm start运行项目。 但是图表不起作用并返回此屏幕。 enter image description here

如屏幕所示,它是fusioncharts-tpl.html的代码。

如何显示正确的融合图? 请帮助我。

0 个答案:

没有答案
相关问题