Accepted answer

i was having this issue, too. ensure jquery is imported before highchart.js. that fixed the issue for me.

<script src=""></script>
<script src=""></script>


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.

    <title>highcharts example</title>

    <script type="text/javascript" src=""></script>
    <script type="text/javascript">
        $(function () {
                chart: {
                    type: 'spline'
                // ... other options and data/series

<script src=""></script>
<script src=""></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>


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:

        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!!!


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.


what happens if you replace

        colors: ["#7cb5ec", "#f7a35c"],
        chart: {
            type: 'column'
        /* ... */


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.

Related Query

More Query from same tag