-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular 8 amcharts 4, example chart does not appear, but watermark does #1424
Comments
@coderofmattie Thanks for the report, I was able to reproduce this and I'm investigating it. |
Please ignore my previous comment - my issue appears to be a conflict with another piece of javascript on the page. If I disable all other javascript, the map works fine. |
fwiw I can reproduce this also.
Versions:
EDIT: After diving into #1146 I can confirm that disabling the build optimizer did solve this issue for me. Unfortunately that isn't a viable path forward for my team. And I really don't want to use a different charting library.. really loving working with amcharts 😞 Possibly related: angular/angular-cli#12112 |
Another FWIW: Looks as though it's likely the same as this issue #1146 although the resolution in that thread is less than satisfactory IMO. Edit: Apologies, just noticed that OP does have |
Could you explain more? In our testing, disabling the build optimizer only had a minor impact on file size. In any case, that issue is not with amCharts, the Angular build optimizer breaks many different packages, so you should file a bug report with the Angular CLI. By the way, the reason it only breaks on maps is because V4 uses d3 for the maps, and it's actually d3 that's breaking. |
@coderofmattie I found the issue. It isn't actually an issue with Angular, you just need to add these lines of code and it will work: let polygonSeries = map.series.push(new am4maps.MapPolygonSeries());
polygonSeries.useGeodata = true; Could you please tell us what example you copied your code from, so we can update it? |
@Pauan So I don't know if you tested it with
|
@ha-akelius Are you using |
@Pauan after using this "build": "ng build --prod --build-optimizer=false" size of Build Package increased from 8-MB to 48-MB & literally i was shocked to see this as well rendering time 100 time increase and take too much time on first hit kindly provide feasible solution of mentioned #Bug |
@sohailss As we have explained, this is not a problem caused by amCharts, it is a bug with Angular. So you need to ask Angular to fix it, we cannot fix it. Also, the build optimizer is a minor optimization, it shouldn't be causing that large of a size difference, so that's probably another bug with Angular. |
My problem is also kind of funny. The legend and other elemnts are viewable but the chart itself is empty. When I run |
Hi @Pauan can you share a link with the Openned Issue in Angular? PS. I've inserted a Timeline in my Angular Application@9.1.7 and changed the build script to package.json: Dockerfile
Thanks in Advance. |
Hi,
I am running Angular 8, and amcharts4, latest versions I think. I wanted to start small with a simple example from the website but the minimal example doesn't render. All I see is the watermark in the lower corner.
Here is my html:
<div id="mapdiv" style="width: 100%; height: 500px; margin: 2px;">
</div>
and finally here is my package.json:
I have tried disabling bootstrap, tweaking the html with various percentages and sizes, carefully matching my example to what's on the website. Everything renders except the map.
I think it's a bug now.
Here is what it looks like in the browser:
The text was updated successfully, but these errors were encountered: