score:6

Accepted answer

first solution:

i had same error, i used highchart as below in my html code:

<head>
<script src="https://code.highcharts.com/highcharts.js"></script>
...
</head>

and my js code was:

$('#container').highcharts('stockchart', {
...
});

with respect to highchart documention, we must use highcharts.chart to create new highstock. so i changed my code to:

<head>
<script src="https://code.highcharts.com/highcharts.js"></script>
...
</head>

and my js code was:

var chart = new highcharts.chart({
        chart: {
                renderto: 'container'
            },
...
});

and this error has been resolved!

second solution:

also with respect to this documentation, if you are running chart and stockchart in combination, you only need to load the highstock.js file.

so changed my code to:

<head>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
...
</head>

and my js code was:

var chart = new highcharts.chart({
        chart: {
                renderto: 'container'
            },
...
});

score:0

this worked for me

<script src="../lib/highcharts.js"/>
<script src="../lib/highcharts-more.js"/>

 var chart = new highcharts.chart({
                    chart: {
                        renderto: 'temperature'
                    },
                    title: {
                        text: 'highstock'
                    },
                    legend: {
                        enabled: true
                    },
                    xaxis: {
                        categories: ['1','2','3','4'],
                        title: {
                            text: 'day'
                        }
                    },
                    yaxis: {
                        title: {
                            text: 'values'
                        }
                    },
                    series: [{
                        name: 'temperature',
                        data: [
                            [5,30],[10,35],[15,40],[20,45]
                        ],
                    }]
                });

Related Query

More Query from same tag