Open DivyaArora-24 opened 6 years ago
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?
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.
My solution I posted here might help: https://github.com/amcharts/amcharts3-angular2/issues/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>
+1 seems to be a timing issue
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.