I want to insert a real-time table into my angular2 application, I use angular2 -highcharts.
npm install angular2-highcharts
app.component.ts
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], }) export class AppComponent { title = 'app works!'; options: Object; constructor() { this.options = { title : { text : 'simple chart' }, series: [{ data: [29.9, 71.5, 106.4, 129.2], }] }; } }
app.component.html
<chart [options]="options"></chart>
app.module.ts
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { AppComponent } from './app.component'; import {ChartModule} from "angular2-highcharts"; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, FormsModule, HttpModule,ChartModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
I had this error when starting the angular2 application: "There is no provider for HighchartsStatic!". Thanks in advance.
source share