Responsive highcharts for Angular2+ base on highcharts used attibute
- You can install ng-hcharts using npm
npm install ng-hcharts --save
- You need to install and include
highcharts.js
library in application viahtml
orwebpack bundler
(more options can be found in officialhighcharts.js
npm install highcharts --save
Make a chart!
import { NgHChartsModule } from 'ng-hcharts';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NgHChartsModule
],
providers: [],
bootstrap: [AppComponent]
})
<div id="chart1" [ng-hcharts]="chartConfig"></div>
Note: For more information about possible options please refer to original highcharts documentation
ng-hcharts
(?any
) - chart options (as from highcharts documentation)oneToOne
(?Boolean
) - When true, the series, xAxis and yAxis collections will be updated one to one, and items will be either added or removed to match the new updated options. For example, if the chart has two series and we call chart.update with a configuration containing three series, one will be added. If we call chart.update with one series, one will be removed. Setting an empty series array will remove all series, but leaving out the series property will leave all series untouched. If the series have id's, the new series options will be matched by id, and the remaining ones removed.
Please follow this guidelines when reporting bugs and feature requests:
- Use GitHub Issues board to report bugs and feature requests (not our email address)
- Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.
Thanks for understanding!
This library is available under the MIT license. However it and is a wrapper for Highcharts. Highcharts itself has an own license. So make sure to follow their license as well (https://github.com/highcharts/highcharts/blob/master/license.txt)