gevgeny / angular2-highcharts

:bar_chart: :chart_with_upwards_trend: Highcharts for your Angular project
MIT License
380 stars 113 forks source link

Support for bullet type chart missing #261

Closed jnbastoky closed 6 years ago

jnbastoky commented 6 years ago

The Bullet chart type is not supported.

https://www.highcharts.com/docs/chart-and-series-types/bullet-chart

Jrubzjeknf commented 6 years ago

Bullet chart type isn't part of the standard library, it's a separate module.

import * as bullet from 'highcharts/js/modules/bullet';

jnbastoky commented 6 years ago

bullet isn't in that module directory.

Jrubzjeknf commented 6 years ago

Did you get the latest version of the highcharts npm package?

jnbastoky commented 6 years ago

Thank you for the help @Jrubzjeknf. My highcharts package did need to be upgraded.

I probably should have consulted the highcharts documentation to begin with: https://www.npmjs.com/package/highcharts#typescript

// Load the exporting module.
import * as Bullet from 'highcharts/modules/bullet';
// Initialize exporting module.
Bullet(Highcharts);
jnbastoky commented 6 years ago

Or this method works now that I actually have the module installed per the angular2-highcharts README.

...
@NgModule({
    ...
    imports: [
      BrowserModule, 
      ChartModule.forRoot(
        require('highcharts'),
        require('highcharts/modules/bullet')
      )
    ],
})