Closed emorling closed 7 years ago
Make sure that your HTML file has this code in it:
<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>
The AmCharts <script>
tags should be before all your other <script>
tags.
I have same issue
I try module from https://github.com/amcharts/amcharts3 like below
import '/node_modules/amcharts3/amcharts/amcharts'
import '/node_modules/amcharts3/amcharts/serial'
import '/node_modules/amcharts3/amcharts/pie'
import '/node_modules/amcharts3/amcharts/themes/light'
import '/node_modules/amcharts3/amcharts/plugins/export/export.min'
import '/node_modules/amcharts3/amcharts/plugins/export/export.css'
Or
<script src="/node_modules/amcharts3/amcharts/amcharts.js"></script>
<script src="/node_modules/amcharts3/amcharts/serial.js"></script>
<script src="/node_modules/amcharts3/amcharts/pie.js"></script>
<script src="/node_modules/amcharts3/amcharts/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="/node_modules/amcharts3/amcharts/plugins/export/export.css" type="text/css" media="all" />
<script src="/node_modules/amcharts3/amcharts/themes/light.js"></script>
<script src="/node_modules/amcharts3/amcharts/plugins/responsive/responsive.min.js" type="text/javascript"></script>
I want to get Amcharts libs from Installing via npm ( npm install amcharts/amcharts3 ), give me advice for do this.
@emorling It seems that you solved the problem, so I'm going to close this.
Feel free to make a new issue if you have any more problems.
@thilinaucsc You must load AmCharts using <script>
tags, import
will not work.
If you have installed AmCharts with npm, then you will have to host the node_modules/amcharts3
folder on your server.
We cannot help you with this, because every server is different.
I have followed the step-by-step instructions but get:
Any ideas?