Bigous / ng2-highcharts

Angular2 library to use Highcharts out of the box
59 stars 23 forks source link

waterfall chart type does not work on ng2-highcharts #32

Closed meiqi2014 closed 8 years ago

meiqi2014 commented 8 years ago

I am able to make line and column chart types work successfully. However when I switch to waterfall, I got an error like the following: browser_adapter.ts:78 ORIGINAL EXCEPTION: Error: Highcharts error #17: www.highcharts.com/errors/17

Is waterfall not supported in ng2-charts? Thanks.

Bigous commented 8 years ago

Hi @meiqi2014 , Waterfall is not on the default highcharts file (highcharts.js) you need to include highcharts-more.js do enable waterfall.

It's the same as the map example. Just add the highcharts-more.js to your deploy, or index file and it should work.

[]'s

meiqi2014 commented 8 years ago

Thanks Bigous for your quick response. Sorry for the newbie question, but which file(s) should I modify to include highcharts-more.js? I am using project https://github.com/Bigous/angular2-seed-ng2-highcharts for my testing.

meiqi2014 commented 8 years ago

I think I figured out how to add highcharts-more.js. In file https://github.com/Bigous/angular2-seed-ng2-highcharts/blob/master/tools/config/project.config.ts , I added following line { src: 'highcharts/highcharts-more', inject: 'libs' }, , and it worked.

Thanks Bigous!

Bigous commented 8 years ago

This one. Add { src: 'highcharts/highcharts-more', inject: 'libs' }, line to the additional_deps variable.

And if you do not need the stok charts, you could change the highstock to highcharts in this file too. []'s