Is is possible to show highmaps and and highcharts in the same page?
See original GitHub issueHello ember ninjas,
Recently I am trying to show highmaps in the a ember page which already has multiple highcharts. However after setting up the ember-cli-build.js according to the official guide. like(enabling highcharts and highmaps at the same time):
emberHighCharts: { includeHighCharts: true, includeHighMaps: true }
I got error in the browser console(latest chrome) says:
highmaps.src.js:115Uncaught Error: Highcharts error #16: www.highcharts.com/errors/16
loader.js:171 Uncaught Error: Could not find module "ember-resolver" imported from "my-app/resolver"
My versions: highcharts: 4.2.1, ember-cli: 2.3.0, ember: ~2.3.1, ember-highcharts: 0.4.3 Any ideas? Thank you so much!
Additional Clue
If you set includeHighCharts: false, includeHighMaps: true
, it displays something.
PS: How to reproduce:
- do a
ember new my-app
to create an empty project - install ember highcharts using
ember install ember-highcharts
- Insert this code into application.hbs already generated:
{{high-charts mode='Map' content=chartData chartOptions=chartOptions}}
- run the app see the error
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
I just learned that if highcharts is already loaded then highmaps needs to be loaded as a plugin. Here are more details about this: http://www.highcharts.com/docs/maps/getting-started.
You can load highmaps as a plugin using the ‘includeModules’ option. Ex:
I added a highmaps example to the tests/dummy app in PR #73. Hopefully this example helps you get highmaps working correctly.
@arthur-zheng good to hear 👍