Is there any way to use highcharts.js with angular2 ?Is there any option available instead of highcharts?
With usage of official highcharts module only (w/o angular2-highcharts and other and even @types/highcharts)
npm install --save-dev highcharts
import * as HC from 'highcharts';
...
export class MainComponent implements OnInit, AfterViewInit {
...
ngAfterViewInit() {
let chartOptions = {
...
chart: {
renderTo: 'chartPanel', // need to have div #chartPanel in template
...
}
}
this.chartInstance = new HC.Chart(chartOptions);
}
this.chartInstance will have all highcharts methods like addSeries, reflow, redraw etc.