Highcharts Error Undefined Is Not A Function
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site $( #container ).highcharts is not a function About Us Learn more about Stack Overflow the company Business Learn more about
Uncaught Typeerror: $(...).highcharts Is Not A Function
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join
Uncaught Typeerror Ha Is Not A Function
the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Highcharts saying undefined is
Jquery(...).highcharts Is Not A Function
not a function when trying to add a new chart up vote 10 down vote favorite I'm trying to put highcharts into my angular app. I'm getting my data from Google Sheets and returning a promise object from the call to google. I then call the Highcharts.Chart() method with my options object. I get the error below when making the call. I've tried to figure out highcharts.chart is not a function what's going on but I am currently lost. I have a prototype that I do not use angular and the chart works great. When I go and add the line new Highcharts.Chart(options) I get the error below. I remove that line the error goes away. Any thoughts/help would be great! Error: TypeError: undefined is not a function at Object.Chart.init (/highcharts.src.js:11014:4) at Object.Chart (/highcharts.src.js:10937:12) at data.then.$scope.sheetdata (/js/controllers/controlChartCtrl.js:11:17) at wrappedCallback (/angularjs/1.2.6/angular.js:10905:81) at /angularjs/1.2.6/angular.js:10991:26 at Scope.$eval (/angularjs/1.2.6/angular.js:11906:28) at Scope.$digest (/angularjs/1.2.6/angular.js:11734:31) at Scope.$delegate.__proto__.$digest ( here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the highcharts.chart is not a constructor workings and policies of this site About Us Learn more about Stack uncaught referenceerror: highcharts is not defined Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions highcharts.chart is not a function angularjs Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join http://stackoverflow.com/questions/21006462/highcharts-saying-undefined-is-not-a-function-when-trying-to-add-a-new-chart them; it only takes a minute: Sign up Highcharts :Uncaught TypeError: $(…).highcharts is not a function up vote 18 down vote favorite 3 Getting this error while running a HighCharts in my JSP Application. Uncaught TypeError: $(...).highcharts is not a function(anonymous function) @ VendorReports:125n.Callbacks.j @ jquery-1.11.0.js:893n.Callbacks.k.fireWith @ jquery-1.11.0.js:928n.extend.ready @ jquery-1.11.0.js:982K @ jquery-1.11.0.js:989 Please suggest what to do http://stackoverflow.com/questions/32011248/highcharts-uncaught-typeerror-highcharts-is-not-a-function $(function () { $('#container').highcharts({ colors: ["#7cb5ec", "#f7a35c"], chart: { type: 'column' }, title: { text: 'Total fruit consumtion, grouped by gender' }, xAxis: { categories: ['Apples' ] }, yAxis: { allowDecimals: false, min: 0, title: { text: 'Number of fruits' } //Nothing wrong with this code javascript jquery jsp highcharts share|improve this question edited Aug 14 '15 at 13:31 David Anderton 9541633 asked Aug 14 '15 at 13:26 Anil Kumar 3721317 can you please add jsfiddle? –Farhan Aug 14 '15 at 13:32 Can't reproduce, it works swimmingly -> jsfiddle.net/nate439j –adeneo Aug 14 '15 at 13:33 @Farhan, jsfiddle.net/mxex28e2. Its working there, But when put the same in my JSP, getting this error –Anil Kumar Aug 14 '15 at 13:33 Then something is wrong with your JSP, not the above code –adeneo Aug 14 '15 at 13:34 Yes @adeneo, I practiced there & copied to my page. here not working –Anil Kumar Aug 14 '15 at 13:34 | show 8 more comments Sign in Pricing Blog Support Search GitHub This repository Watch 104 Star 3,874 Fork 394 ankane/chartkick Code Issues 111 Pull requests https://github.com/ankane/chartkick/issues/99 20 Projects 0 Pulse Graphs New issue Error Loading Chart: undefined is https://codedump.io/share/1QhUKTSsYm95/1/highcharts-uncaught-typeerror-highcharts-is-not-a-function not a function #99 Closed michaelfeihstel opened this Issue Jun 24, 2014 · 5 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 3 participants michaelfeihstel commented Jun 24, 2014 I'm trying to use Chartkick with Highcharts is not and I don't seem to be able to get it up and running. While using the Google Charts option works flawless, as soon as I try to use Highcharts, which I prefer, the chart throws "Error Loading Chart: undefined is not a function". According to the console in Chrome this seems to happen at this function in highcharts.js: is not a // Set up auto resize if (optionsChart.reflow !== false) { addEvent(chart, 'load', function () { chart.initReflow(); }); } Does anyone have any idea what might be the issue here? Edit: Firefox actually narrows it down to the addEvent function. Owner ankane commented Jun 24, 2014 Haven't seen this before. What versions of Highcharts and jQuery? michaelfeihstel commented Jun 24, 2014 Highcharts 4.0.1 and jQuery 1.11.0 Since Highcharts 4 is relatively new though, I also tried using v3 which is hosted on their CDN ( http://code.highcharts.com/ ) - with the same result unfortunately. Owner ankane commented Jun 24, 2014 Think something on your page is interfering. That version combo works for me in both Chrome and Firefox. michaelfeihstel commented Jun 24, 2014 Since I couldn't find much information on this error, you might be right. However I already tried removing any other included JS (except jquery obviously) - same result. I'll keep looking into it and close this for now since it's likely not really related to your gem. Thanks an Gherkin Git Go Groovy Haml Handlebars Haskell HTML HTTP Ini iOS Jade Java Javascript jQuery JSON Julia Keyman LaTeX Linux Less LOLCODE Makefile Markdown MATLAB MySQL NASM Node.js NSIS Objective-C Pascal Perl PHP PHP Extras PowerShell Python R React JSX reST (reStructuredText) Rip Ruby Rust SAS Sass (Sass) Sass (Scss) Scala Scheme Smalltalk Smarty SQL Stylus Swift Twig TypeScript Vb.net VHDL Wiki markup YAML Other Search Anonymous - 10 months ago 1198x Javascript Question Highcharts :Uncaught TypeError: $(...).highcharts is not a function Getting this error while running a HighCharts in my JSP Application. Uncaught TypeError: $(...).highcharts is not a function(anonymous function) @ VendorReports:125n.Callbacks.j @ jquery-1.11.0.js:893n.Callbacks.k.fireWith @ jquery-1.11.0.js:928n.extend.ready @ jquery-1.11.0.js:982K @ jquery-1.11.0.js:989
Please suggest what to do
$(function () {
$('#container').highcharts({
colors: ["#7cb5ec", "#f7a35c"],
chart: {
type: 'column'
},
title: {
text: 'Total fruit consumtion, grouped by gender'
},
xAxis: {
categories: ['Apples' ]
},
yAxis: {
allowDecimals: false,
min: 0,
title: {
text: 'Number of fruits'
}
//Nothing wrong with this code
Anonymous Answer Email {} Share What happens if you replace $('#container').highcharts({ colors: ["#7cb5ec", "#f7a35c"], chart: { type: 'column' }, /* ... */ by var chart = new Highcharts.Chart({ colors: ["#7cb5ec", "#f7a35c"], chart: { type: 'column', renderTo: 'container' }, /* ... */ ? I had the same issue as you a while ago and I resolved it by using this type of initialization. Source (Stackoverflow) http://stackoverflow.com/questions/32011248/highcharts-uncaught-typeerror-highcharts-is-not-a-function C