Search code examples
angularhighchartsangular2-highcharts

angular2-highcharts is not working in angular 11


I was working with angular2-highcharts it was working since angular 8 but found its not working after I upgrade to angular 11

Here is my snippet

import { ChartModule } from 'angular2-highcharts';

@NgModule( {
    declarations: [
        AppComponent
    ],
    imports: [        
        ChartModule.forRoot(
            require( 'highcharts/highstock' ),
            require( 'highcharts/modules/exporting' ),
            require( 'highcharts/indicators/indicators-all' ),
            require( './highcharts/modules/annotations-advanced.src' ),
            require( 'highcharts/modules/price-indicator' ),
            require( 'highcharts/modules/full-screen' ),
            require( 'highcharts/modules/stock-tools' ),
            require( 'highcharts/modules/drag-panes' ),
            require( 'highcharts/modules/boost' )
        ),      
    ]

} )

Solution

  • I was also facing same issue I change my framework to highcharts-angular its highcharts official wrapper. and also have several download and good review.

    Your project was working with Angular8 because that version uses the "View Engine" compiler while Angular11 uses the Ivy compiler. The short answer answer to your question is NO. angular2-highcharts does not support the new "Ivy compiler"