, angular 2 RC. mharrington - .37 ( ), - angular 2.
ChartModule. . github demo (plnkr)
angular2 -highcharts:
@ngModule (prob app.module.ts)
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { ChartModule } from 'angular2-highcharts';
import { App } from './App';
@NgModule({
imports: [BrowserModule, ChartModule],
declarations: [App],
bootstrap: [App]
})
export class AppModule {}
:
import { Component } from '@angular/core';
@Component({
selector: 'simple-chart-example',
template: `
<chart [options]="options"></chart>
`
})
export class App {
constructor() {
this.options = {
title : { text : 'simple chart' },
series: [{
data: [29.9, 71.5, 106.4, 129.2],
}]
};
}
options: HighchartsOptions;
}
, , ,
import { ChartModule } from 'ng2-charts';
import { ChartModule } from 'ng2-charts/components/charts/charts';
- (# 440)
, , , [datasets] , [data] : ng2-charts - Can not " " , " "