Angular2 highchart-more

I am trying to create a spider chart. I use this

But I get this error

`import { CHART_DIRECTIVES, Highcharts } from 'angular2-highcharts'; 
 import HighchartsMore from 'highcharts/highcharts-more';   
 HighchartsMore(Highcharts);
 ...`
+4
source share
1 answer

Just do it, it worked for me, I'm trying to get a calibration chart. It worked for me and set the polarity for you to get a spider chart

declaration chart module like this

import { ChartModule} from 'angular2-highcharts';

imports

@NgModule({
  declarations: [...],
  imports: [
    ChartModule,
    ....
  ],

and on the export class page where you want to call highchart

import * as Highcharts from 'highcharts';
import * as HighchartsMore from 'highcharts/highcharts-more';

HighchartsMore(Highcharts);

export class component {

 constructor(public navCtrl: NavController) {
  this.chart1 = {
     chart:{
     polar: true,
     type:'line',
     backgroundColor:'rgba(255, 255, 255, 0)',
     },
      title : { text : 'simple chart' },
      series: [{
        data: [29.9, 71.5, 106.4, 129.2],
      }]
    };
 }
chart1: Object;

html code

<chart [options]="chart1" > </chart>
+1
source

Source: https://habr.com/ru/post/1660760/


All Articles