Cannot read property 'Chart' of undefined highcharts-ng

754 views Asked by At

Hello I have a problem with highcharts-ng I put

angular.module('myApp', [...'highcharts-ng'])

In my index.html

<script src="http://code.highcharts.com/highcharts.src.js"></script>
<script src="node_modules/highcharts-ng/dist/highcharts-ng.js"></script>

In my view.html

<highchart id="chart1" config="chartOptions"></highchart>

And in ctrl

$scope.chartOptions= {
                options: {
                    chart: {
                        type: 'bar'
                    }
                },
                series: [{
                    data: [10, 15, 12, 8, 7]
                }],
                title: {
                    text: 'Hello'
                },

                loading: false
            }

That it's a default configuration on https://github.com/pablojim/highcharts-ng But it return error:

Cannot read property 'Chart' of undefined
    at initChart (vendors.min.js:41767)
    at linkWithHighcharts (vendors.min.js:41782)
    at highchartsCb (vendors.min.js:41896)
    at processQueue (vendors.min.js:16209)
    at vendors.min.js:16225
    at Scope.$eval (vendors.min.js:17483)
    at Scope.$digest (vendors.min.js:17296)
    at ChildScope.$apply (vendors.min.js:17591)
    at HTMLSpanElement.<anonymous> (vendors.min.js:25666)
    at HTMLSpanElement.dispatch (vendors.min.js:3)

What is wrong?

0

There are 0 answers