score:48
i was having this issue, too. ensure jquery is imported before highchart.js. that fixed the issue for me.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
score:1
the approach taken from the official examples is working well. they defined the include script tag within the body tag therefore the solution given by kabulan0lak is better i think.
<html>
<head>
<title>highcharts example</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('#container').highcharts({
chart: {
type: 'spline'
}
// ... other options and data/series
});
});
</script>
</head>
<body>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
</body>
</html>
score:1
it happens with me too. in my case, i need click in a button to load the chart and if i click twice or more the chart stops to work. i was setting the color like this:
highcharts.setoptions({
colors: highcharts.map(highcharts.getoptions().colors, function (color) {
return {
radialgradient: {
cx: 0.5,
cy: 0.3,
r: 0.7
},
stops: [
[0, color],
[1, highcharts.color(color).brighten(-0.3).get('rgb')] // darken
]
};
})
});
$.getjson("./mydatagraph.php", function(response){
// create the chart
var chart = highcharts.chart('mygraph', {
chart: {
plotbackgroundcolor: null,
plotborderwidth: null,
plotshadow: false,
type: 'pie'
},
... });
i couldn't solve the error, but i remove the "highcharts.setoptions" and the chart works!!!
score:2
i was using an old version of the high charts version. from their website i assumed that the version listed under specific version was their latest version and used that so it wouldn't auto update on me. however the version they had listed was super old so changing it to the actual latest version fixed the issue.
score:38
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.com
Related Query
- Uncaught TypeError: e.doDrilldown is not a function - Highcharts
- Uncaught TypeError: undefined is not a function - Highcharts - MVC
- Uncaught TypeError: undefined is not a function when using highcharts
- Highcharts tooltips formatter return function throwing Uncaught TypeError: j.call is not a function
- Highcharts 9.1.1 export from fullscreen with print option- throw error on browser console Uncaught TypeError: a.hasAttribute is not a function
- Highcharts :Uncaught TypeError: $(...).highcharts is not a function
- Highcharts saying undefined is not a function when trying to add a new chart
- HighCharts TypeError: ha is not a function
- Highcharts JS Uncaught TypeError: x[(intermediate value)(intermediate value)(intermediate value)] is not a constructor
- Uncaught TypeError: $(...).highcharts is not a function in aspx web page with master page but it is working with basic html page
- TypeError: highcharts is not a function
- I am facing this error highcharts.js:formatted:1 Uncaught ReferenceError: Highcharts is not defined can any one help me with this
- Highcharts solid-gauge Error: c.color.tweenTo is not a function
- highcharts a.onContainerClick is not a function
- Highcharts error csv.replace is not a function
- Can not exporting renderer shapes added in callback function in highcharts / highstock
- Highcharts plotBands do not work with setExtremes function
- chartOptions.redraw is not a function in highcharts using angular
- Highcharts function not covered with unit tests with Karma + Jasmine
- Uncaught ReferenceError: Highcharts is not defined at Object.success
- Highcharts tooltip formatter function does not display values in table correct
- HighCharts does not recognize a function of Legend
- Decimals on yAxis are not being displayed, even if that same code works on highcharts jsfiddle
- Uncaught TypeError: c.color.tweenTo is not a function
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- Highchart uncaught error - Uncaught TypeError: $(...).highcharts is not a function
- Uncaught TypeError: fn.call is not a function
- Why is my addPoint() not recognized as a function in my highcharts code?
- Highcharts Click Function Not Being Called?
- Highcharts (highstock.js) exporting function does not work on Embedded Visualforce pages
More Query from same tag
- highcharts waterfall not summing correctly
- Legend and DataLabels with different "names"
- Can I add on the webpage, data that I get from a Highcharts function?
- Issue with Dates - trying to plot MongoDB data in Highcharts via PHP
- how can we set different colors to highcharts-default-patterns?
- How to set the highcharts interactive with select option
- With Highmaps, why is the callback in my jQuery fadein happening prior to the fade completing?
- Need to link URL in HighChart
- Type Labels on Stacked and grouped column - Highcharts
- how to use tickInterval or step in the highcharts?
- Highcharts with JSON data and multiple series
- Pie Graph Click in Highcharts
- How to Get Highcharts Sparkline to Show Up On My Page.
- How to implement Highcharts column-drilldown chart in Rails application?
- Highchart js max 15 plots to be plotted
- highcharts example for using data from database with mvc
- How can I fix the error #17 "The requested series type does not exist" error when trying to display a highcharts graph in Vue.js?
- Highchart area chart with date time
- How to have shadow enabled in hover and select of highmap?
- Highcharts multiple data points between xAxis
- I want gird lines of x-axis and y-axis in highcharts but i don't want x-axis value and y-axis value
- High Charts Stacked column with drilldown not working properly
- Highchart graph display on iPad going out of container
- jQuery Graphing Libraries : Two Y axis points corresponding to a single X axis
- Highchart error Uncaught SyntaxError: Unexpected number
- style highmaps mapbubbles onclick
- Highcharts Single Data Label in middle of Area
- Tooltip doesn't show properly in highcharts
- How can I load a custom popup on a click event in Highcharts?
- Legend height seems to have an impact on pie size