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