Comments (22)
@sunny9240 , yep I got it.
from angular2-highcharts.
@pradipkachhadiya I'll create a gist soon
from angular2-highcharts.
I couldn't use this example! It gives me the error Map is unknown chart type
. So I solved it with this link
from angular2-highcharts.
Sure http://plnkr.co/edit/AmDfKwhRhshFn3CPprkk?p=preview
from angular2-highcharts.
Thanks!
from angular2-highcharts.
I can duplicate your example and get it to work on a simple site, however I am trying to integrate into a site that I have forked off of angular2-seed.
I can't get it to integrate without throwing a "Highcharts is not defined" error when loading the highmaps module. I have tried a lot of different system config options pointed at both local npm locations and at your example locations and still get the same error when trying to load the highmaps module that Highcharts is undefined even though I can set static settings for the Highcharts like in your examples...
Any ideas?
Regards,
Marc
from angular2-highcharts.
FWIW, I realized that including the highstock mapping was needed in the system config section. (Why not just highcharts.js?)
'highcharts/highstock.src': 'https://cdn.rawgit.com/highcharts/highcharts-dist/v4.2.1/highstock.js',
This cleared up the "Highcharts is not defined" error, but it still won't let me initialize the Highchmap
Highchmap(Highcharts);
If I include that, the application errors out without a useful error message. I can see that it has imported the highcharts/modules/map.js file, but for some reason won't let it connect extend Highcharts.
Marc
from angular2-highcharts.
Finally got it working. I had to import the map module like this:
import * as Highchmap from 'highcharts/modules/map';
from angular2-highcharts.
I see. It really looks very unclear and I think the reason is how Highcharts modules are organised. It was not created to be used as ES2015 modules. BTW what bundler do you use with angular2-seed ?
from angular2-highcharts.
Angular2-seed uses systemjs builder.
from angular2-highcharts.
Another question, how do you load a highcharts plugin? I have a highcharts zoom out plugin I would like to incorporate but i think that since it is not in a module format I can't load the same as the highcharts modules. Here is the link the plugin.
[http://www.highcharts.com/plugin-registry/single/26/Zoom%20Out%20Selection]
from angular2-highcharts.
I think it depends on how the plugin is implemented. Looks like this one (and most of other ones) is just a global script and not a module. AFAIK webpack allows to inject such scripts to bundle but i don't know how to manage it with systemjs.
from angular2-highcharts.
Thanks for the response. It seems like others using angular2-highcharts may end up wanting to extend highcharts with plugins, so worth thinking about.
I ended up pasting the plugin javascript at the bottom of my component file that is using highcharts and that seems to work. Not the most elegant solution, but is working. When I tried other routes, the load order became problematic since highcharts has to have been called before the plugin and the highcharts module is only loaded when the component is needed so a global include of the plugin wasn't working for me.
from angular2-highcharts.
I see. Do you have any ideas how it can be simplified in angular2-highcharts ?
from angular2-highcharts.
Hello,
has there been any new enlightment on this problem? I don't get it to work whenever I try something like this:
const Highcharts = require('highcharts/highcharts.src'); import 'highcharts/adapters/standalone-framework.src'; import * as Highchmap from 'highcharts/modules/map';
in my module while having it defined like that
'angular2-highcharts': 'https://cdn.rawgit.com/gevgeny/angular2-highcharts/v0.3.0/dist', 'highcharts/highstock.src': 'https://cdn.rawgit.com/highcharts/highcharts-dist/v4.2.1/highstock.js', 'highcharts/adapters/standalone-framework.src': 'https://cdn.rawgit.com/highcharts/highcharts-dist/v4.2.1/adapters/standalone-framework.src.js', 'highcharts/modules/map': 'https://cdn.rawgit.com/highcharts/highcharts-dist/v4.2.1/modules/map.js', 'highcharts': 'node_modules/highcharts',
as a "map" specification in my system.config.js file I finally get a bunch of errors:
3:18 Error: (SystemJS) Highchmap is not defined
ReferenceError: Highchmap is not defined
I'm confused.
from angular2-highcharts.
@gevgeny can you please provide an example using webpack instead of systemjs.
from angular2-highcharts.
@khraibani there is one in the readme
from angular2-highcharts.
Hi @gevgeny , how can we use highchart and highmap in the same module ?
from angular2-highcharts.
@Tryptich , Have you got any solution to use highchart and highmap in the same module ?
from angular2-highcharts.
Hi @gevgeny , how can we highchart and highmap both in my angular 2 web app?
from angular2-highcharts.
Have you got any solution to use highchart and highmap in the same module ?'
@Tryptich can you please provide an example or solution ?
from angular2-highcharts.
@pradipkachhadiya I seem to be dealing with the similar issue in Angular2. i require highstocks and highmaps within a single module.
But from what i have read, people suggest we place them in separate modules.
from angular2-highcharts.
Related Issues (20)
- How to draw a candlestick chart? HOT 2
- How to show multiple chart in same graph? do you have any example?
- ERROR in Error during template compile of 'AppModule' Function calls are not supported in decorators but 'ChartModule' was called. HOT 5
- ar
- How to import "indicators" inside AppModule
- multi language support HOT 1
- use gauge chart in pure typeScript projects HOT 3
- Support for bullet type chart missing HOT 5
- Chart not responsive - width stuck at 600px no matter what I do HOT 7
- sunburst module missing ? HOT 2
- How to make Gauge chart dynamic as speedometer in angular 4 HOT 1
- Can't use responsive attribute in options
- The live demos do not work
- type=line did not show data in graph
- Use classic mode instead of Styled mode
- serie type of columnrange HOT 2
- Event properties target.category and clickevent.point are not available in angular 6 typescript
- How to use this plugin for commerical use HOT 1
- Angular 8 support?
- How to implement Gantt in angular2-highcharts? is it supported or not?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular2-highcharts.