import { ElementRef , Injectable } from '@angular/core' ; import { chart , Options } from 'highcharts' ; import * as Highcharts from 'highcharts' ; declare var require ; require ( 'highcharts/highcharts-more' ) ( Highcharts ) ; require ( 'highcharts/modules/solid-gauge' ) ( Highcharts ) ; require ( 'highcharts/modules/broken-axis' ) ( Highcharts ) ; @ Injectable ( ) export class ChartDeprecatedHelper { chartContainer : ElementRef ; public init ( chartContainer ) { this . chartContainer = chartContainer ; } public renderChart ( options ) { if ( this . chartContainer && options . chart ) { chart ( this . chartContainer . nativeElement , options ) ; } } }