热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

错误:Highcharts错误#13离子角度-Error:Highchartserror#13ionicangular

iamnewtoHighChartsandwanttouseittoionic.butihaveatroubleandtryingtodeterminewha

i am new to HighCharts and want to use it to ionic. but i have a trouble and trying to determine what is wrong with my code. on console its showing some error message like this

我是HighCharts的新手并希望将它用于离子。但我遇到了麻烦,并试图确定我的代码有什么问题。在控制台上它显示一些像这样的错误消息

i have read question about it Highcharts error #13 and AngularJs How can I fix Highcharts error #13? but still cannot found my problem this is my controller

我已经阅读过有关它的问题Highcharts错误#13和AngularJs如何修复Highcharts错误#13?但仍然无法找到我的问题这是我的控制器

    .controller("homeController", function ($scope, $http) {
$scope.myDropDown = 'one';
        $scope.data = {};
        $scope.submit = function () {
            var diagramlink = 'http://fendypradana.com/alfalahkeu/Apifalah/laporhari/format/json';

            var processed_json = [], kategori = [];
            $http.post(diagramlink, { tanggalawal: $scope.data.tglawal, tanggalakhir: $scope.data.tglakhir }).then(function (res) {

                console.log(res.data);
                console.log(res.data.data[2].tanggal);

                for (i = 0; i ' + this.x + '
' + 'Total Pembayaran: Rp.' + Highcharts.numberFormat(this.y, 1); } }, chart: { type: 'column' }, plotOptions: { }, series: [ { name: 'coba', data: processed_json, dataLabels: { enabled: true, rotation: -90, color: '#FFFFFF', align: 'right', x: 4, y: 10, style: { fontSize: '13px', fontFamily: 'Verdana, sans-serif' } } } ] }); }) } })

and this is my html

这是我的HTML

Placeholder for chart

Any suggestions would really help.

任何建议都会有所帮助。

1 个解决方案

#1


1  

I went through your code, the problem is you are using highcharts-ng and using jquery way to bind the data,

我查看了你的代码,问题是你使用的是highcharts-ng并使用jquery方法来绑定数据,

Do this, inside the controller, define a config

在控制器内部执行此操作,定义配置

 $scope.highchartsNG = {
        options: {
            chart: {
                type: 'bar'
            }
        },
        series: [{
            data: assign your data
        }],
        title: {
            text: 'Hello'
        },
        loading: false
    }

HTML:

 

推荐阅读
author-avatar
潘景洪Phant_255
这个家伙很懒,什么也没留下!
Tags | 热门标签
RankList | 热门文章
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有