Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gevgeny authored Feb 12, 2017
1 parent a3f8fc5 commit 9f321e6
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ import { ChartModule } from 'angular2-highcharts';
import { App } from './App';

@NgModule({
imports: [BrowserModule, ChartModule.forRoot(require('highcharts')],
imports: [
BrowserModule,
ChartModule.forRoot(require('highcharts')
],
declarations: [App],
bootstrap: [App]
})
Expand Down Expand Up @@ -279,6 +282,27 @@ Check out structure of the `node-modules/highcharts` folder to find necessary mo
### Access to the Highcharts Static Members
```diff
...

+ const Highcharts = require('highcharts');
+ Highcharts.setOptions({
+ colors: ['#50B432']
+ });

@NgModule({
...
imports: [
BrowserModule,
ChartModule.forRoot(
- require('highcharts'),
+ Highcharts,
],
})
```
👉 [Live Demo](https://plnkr.co/edit/uCtPFUExmZFG0diOvbXS?p=preview)
##More Examples
Here are some common charts examples with Webpack integration https://github.com/gevgeny/angular2-highcharts/tree/master/examples/webpack
Expand Down

0 comments on commit 9f321e6

Please sign in to comment.