Skip to content
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

AmChartsService not showing amcharts for angular 6 #94

Open
DivyaArora-24 opened this issue Oct 23, 2018 · 4 comments
Open

AmChartsService not showing amcharts for angular 6 #94

DivyaArora-24 opened this issue Oct 23, 2018 · 4 comments

Comments

@DivyaArora-24
Copy link

I tried using the AMcharts in angular 6 and followed the same steps as mentioned in the documentation 👍 https://github.com/amcharts/amcharts3-angular2
The code does not show the AMcharts.

this.chart = this.AmCharts.makeChart('chartdiv', {
'type': 'pie',
'theme': 'light',
'dataProvider': this.makeRandomDataProvider()
});

I downloaded the code as well and it did not showed the charts.

Using the older method :
const chart = AmCharts.makeChart() works fine.

Please let me know if any changes needs to be done specific to angular 6 and above.

@RobbiesCode
Copy link

Hi,

I am not sure what could be wrong with your setup. I have just tried setting up a angular-cli project (Angular 7) according to our Readme, and I have no troubles. Do you get any error messages at all?

@DivyaArora-24
Copy link
Author

No, I did not got any error. The code compiled successfully. But it just displays a text "JS chart by amCharts". No chart is displayed.
Even the code that I downloaded from github behaved in the same way.

@zuice32
Copy link

zuice32 commented Nov 11, 2018

My solution I posted here might help: #12

Don't forget to include this in the head of the index.html:


  <script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
  <script src="https://www.amcharts.com/lib/3/serial.js"></script>
  <script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
  <script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>

@notsure
Copy link

notsure commented Apr 9, 2020

+1 seems to be a timing issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants