Open fr4ngus opened 7 years ago
Is it to avoid the ERROR in Error encountered resolving symbol values statically. Calling function 'ChartModule', function calls are not supported.
?
Yep
Yea, would be great. But HighchartsService
supposed to be private part of the lib. Are there any simplier approach to achieve this ? I would change something in the lib if it is necessary
How would you load Highcharts modules with this solution? Modules like highcharts/modules/solid-gauge.
Edit: This seems to work for exporting, and for solid gauge:
export function highchartsFactory() {
var hc = require('highcharts');
var hcm = require('highcharts/highcharts-more');
var exp = require('highcharts/modules/exporting');
var sg = require('highcharts/modules/solid-gauge');
hcm(hc);
exp(hc);
sg(hc);
return hc;
}
(Added highcharts-more to make solid gauge work)
@jessenic should work, but my idea was to hide how modules initialises: module(hc)
. It is already implemented in the wrapper: https://github.com/gevgeny/angular2-highcharts/blob/master/src/index.ts#L25
I know this issue is marked closed but I'm still having issues on my rollup. Here is the output:
'ChartModule' is not exported by 'node_modules\angular2-highcharts\dist\index.js'
'ChartModule' is not exported by 'node_modules\angular2-highcharts\dist\index.js'
'HighchartsStatic' is not exported by 'node_modules\angular2-highcharts\dist\HighchartsService.js'
Error: 'HighchartsStatic' is not exported by node_modules\angular2-highcharts\dist\HighchartsService.js
Im using
"@angular/compiler-cli": "2.4.4",
"rollup": "^0.41.4",
"rollup-plugin-commonjs": "^7.0.0",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-uglify": "^1.0.1",
"@types/highcharts": "4.2.37",
"angular2-highcharts": "^0.5.5",
What versions of these dependencies did you have success with @fr4ngus ?
thank you @fr4ngus. solved my "Error encountered resolving symbol values statically" problem that appeared mysteriously after an upgrade
Hi, Thank you for the great library. Just for people that using AOT compilation (typically people that use angular-cli), you have to add the following code to your AppModule in order to work:
In your AppModule:
In the module where you use the chart directive:
You could also declare as a singleton (ShareModule)
Thank you !