My project is in angualr js which is working in my local with highcharts fine but when I tried to deploy on the server it is giving error highhcarts is not define . whne i searched on the internet i found there is problem with grunt.js which is minify the js so does any one have idea how to get rid of that error (highchart is not define!!! )
Asked
Active
Viewed 409 times
0
-
Did you upload the JavaScript files? Do you see the source for highCharts? This is impossible for us to debug. – epascarello Jul 21 '15 at 14:02
-
thanks for prompt reply . can you tell me which javascript files! – sam patel Jul 21 '15 at 14:04
-
The one that contains the code for highcharts. Did you look at the developer console and see if you have 404s? – epascarello Jul 21 '15 at 14:05
-
yes i saw developer console it is not giving me 404 . – sam patel Jul 21 '15 at 14:11
-
So you did not upload the files – epascarello Jul 21 '15 at 14:13
-
when i deploy on server in configuration file it is doing bower install which is getting all the dependencies – sam patel Jul 21 '15 at 14:25
-
Well something is not right there.... Look at what the include paths are and look what the server has in that location. – epascarello Jul 21 '15 at 14:27
-
what is in local that what going on server . i have double checked it that on server path for libraries are correct – sam patel Jul 21 '15 at 14:41
1 Answers
0
Either you have included the highcharts script twice, or you haven't included the highcharts script at all.
When using highcharts-ng you need to include these:
<head>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script>
<script src="http://code.highcharts.com/stock/highstock.src.js"></script>
<script src="../../src/highcharts-ng.js"></script>
<script src="app.js"></script>
</head>
Here is a DEMO of using "highvcharts-ng". Click on "ExternalResources" to see what scripts are loaded.

M H
- 2,179
- 25
- 50
-
As my application is in angular i am using highcharts -ng and script is like this – sam patel Jul 21 '15 at 14:14
-
thats what i am using in script to get highcharts and highstock libraries – sam patel Jul 21 '15 at 14:22
-
-
-
First load `highstock.src.js` then load `highcharts-more.src.js` and as the last one load `highcharts-ng.js`. The order is simply so wrong.. – Paweł Fus Jul 22 '15 at 10:54
-
i took that list of scripts directly from their example. You may have a different issue. – M H Jul 23 '15 at 19:00
-
I solved the problem as i knew problem was with grunt file. there was path of highstock which needed to be updated in grunt. i appreciate your help thanks to all – sam patel Jul 24 '15 at 14:58