Can't really help (although we have used amCharts v3 in Pi Vision 4. But i'm a big fan of both amCharts and PiV4, so good to see this combo of soon-to-be-released versions is being used!
PS: i see this is related to the extensions. You really need those? Else you could skip the dead weight and thereby get rid of the issue...
the reason I want to use Amchart4 is that it offers support to use multiple x-axes in a chart, which is not supported in Amcharts3 . For my custom symbol this is very usefull cause I want to compare trends starting at different time.
Ah, didn't know that v4 supported mutliple category axis! That does help a lot in building overlays in a single chart instead of layering two charts on top of each other (which has serious drawbacks and is merely a stop-gap.
But back to the original issue, can't just exclude the export extension?
3 of 3 people found this helpful
I've encountered the exact same problem when trying to import the AmChart4 lib to the PiVision4, but finally found a workaround:
1. Add rxjs-compat lib: npm install rxjs-compat@6 --save (only the campatibility lib, dont update the rxJS; rxjs/migration.md at master · ReactiveX/rxjs · GitHub)
2. Change every "import()" function to "require()" in node_modules\@amcharts\amcharts4\.internal\core\export\Export.js and node_modules\@amcharts\amcharts4\.internal\core\responsive\responsive.js
For example, line in Export.js:
case 0: return [4 /*yield*/, import(/* webpackChunkName: "fabric" */ "../../fabric/fabric")];
case 0: return [4 /*yield*/, require(/* webpackChunkName: "fabric" */ "../../fabric/fabric")];
3. After adding chart component to module.ts everything should work fine.
Hope that helps
Thanks Bartosz your workaround is running fine