admin管理员组文章数量:1400329
I am trying to make some charts with Zingchart but I can't seem to get it working. I installed it using the bower install. On the website they say you need to verify your directory, and I do see that mine is diffrent from what they show.
Theirs:
bower_ponents
-- zingchart
-- zingchart.min.js
-- modules
-- ...
-- custom
-- ...
Mine:
bower_pentents
-- zingchart
-- client
-- zingchart.min.js
-- modules
-- ...
The error I get when I want to build a standard chart is the following:
ReferenceError: zingchart is not defined
It points to the part in the code where the chart is renderd:
zingchart.render({
id:'chartDiv',
data:chartData,
height:400,
width:600
});
I am using javascript and angular. What am I doing wrong?
I am trying to make some charts with Zingchart but I can't seem to get it working. I installed it using the bower install. On the website they say you need to verify your directory, and I do see that mine is diffrent from what they show.
Theirs:
bower_ponents
-- zingchart
-- zingchart.min.js
-- modules
-- ...
-- custom
-- ...
Mine:
bower_pentents
-- zingchart
-- client
-- zingchart.min.js
-- modules
-- ...
The error I get when I want to build a standard chart is the following:
ReferenceError: zingchart is not defined
It points to the part in the code where the chart is renderd:
zingchart.render({
id:'chartDiv',
data:chartData,
height:400,
width:600
});
I am using javascript and angular. What am I doing wrong?
Share Improve this question edited Nov 2, 2015 at 13:19 AnniekJ asked Nov 2, 2015 at 11:29 AnniekJAnniekJ 551 silver badge9 bronze badges2 Answers
Reset to default 5Are you including the script in your html file?
Are you direct injecting the zingchart module into your app? e.g. var app = angular.module('myapp', [ 'zingchart-angularjs' ]);
Are your scripts in the correct order in your .html ( must be loaded in order ) angular > zingchart > your zingchart render code.
It appears the page that you are referencing from is outdated since the repository file structure has changed as you had experienced. The error you are receiving is related to the file not being included in your html properly.
Instead you should include zingchart as follows: <script src="bower_ponents/zingchart/client/zingchart.min.js"></script>
.
Have you checked out the ZingChart-AngularJS directive? It could be useful in your development since you are using AngularJS
本文标签: javascriptZingchart can39t get it working Reference error zingchart is not definedStack Overflow
版权声明:本文标题:javascript - Zingchart: can't get it working? Reference error: zingchart is not defined - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744160478a2593314.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论