加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

角度 – 离子2 Highcharts

发布时间:2020-12-17 17:51:08 所属栏目:安全 来源:网络整理
导读:我正在使用Ionic 2框架并希望实现highcharts. 我按照mharington(离子团队)的步骤https://forum.ionicframework.com/t/ionic-2-and-highcharts-modules/59365/2来设置我的第一张高图. 我得到的错误是我无法导入它但我安装了节点模块 angular2-highcharts incl
我正在使用Ionic 2框架并希望实现highcharts.

我按照mharington(离子团队)的步骤https://forum.ionicframework.com/t/ionic-2-and-highcharts-modules/59365/2来设置我的第一张高图.

我得到的错误是我无法导入它但我安装了节点模块

Error

enter image description here

angular2-highcharts include in my node_modules

请帮忙

解决方法

要在Ionic 2中使用HighChart,您必须:

> installation

npm install highcharts --save

>在要使用图表的页面上加载模块

declare var require: any;
let hcharts = require('highcharts');
require('highcharts/modules/exporting')(hcharts);`

>在activity.html页面上

<div #graph></div>

>最后

initLapChart() {
    hcharts.chart(this.div.nativeElement,{
        chart: {..}
    ... 
}

我希望我很清楚.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读