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
- how to set html tags in text to highstock tooltip by lazy_high_chart gem
- jquery chart should show ticks labels without data
- Highcharts horizontal bar chart with text inside bars
- Highcharts GANTT Chart Tooltip Mouse-over Tracking Issue
- How can i force Highcharts to use same symbols in Legend and Series?
- jsonp callback data in highcharts not working
- HighCharts - display heart rate?
- Highcharts custom events plugin right click event not firing
- Display the Plotted value on x axis using highcharts
- High Charts Stacked column with drilldown not working properly
- Highcharts - How to separate the functionality of the navigator from the graph
- How do you remove x-axis labels from a highchart.js bar chart
- HIGHCHARTS: Filling area above line with color area representing contribution to line values
- Javascript High Charts changing Rec Rill hover color
- No animation when adding points to two serieses in Highcharts
- How to set color of each slice in pie chart in high charts library?
- Fixed min and max dynamic time ticks in chart
- DIsplay Ajax data in Highchart js
- Hide one serie's dataLabel on Highcharts
- Highcharts more than one series
- Pass JSON-encoded PHP Variable to HighCharts
- HighCharts Bubble graph JSON as data source
- How can we display daily visits using Highcharts?
- How to use HighCharts dart library in Flutter app?
- new Highcharts.Chart creating trouble. Why?
- Cannot set bar chart width for specific data, Highcharts
- highchart - scatter : set decimals of x-axis and y-axis
- Highstock And Highcharts: How I use StockChart and pie chart on the same page
- Unpredictable behavior of y-axis labels of Highchart
- Set position for each flag in highstock