A DataFlex custom component wrapper for the amCharts library.
Master branch is for amCharts v4. Use the "v3" branch for amCharts v3.
Install DataFlex. This workspace is setup for version 20.0, but should be easy to migrate.
Install Node.js. At least version 14.15 is required.
Install dependencies - from your AmChartsComponent folder run:
npm ci
Build the component client-side files (will be placed in AppHtml/amCharts/
):
npm run build
Start the DataFlex Studio and open the AmChartsComponent workspace. The studio will copy themes and the JavaScript engine into the AppHtml
folder.
Register the web application from the studio menu "Tools > Register WebApp...".
Hit F5 to run the application.
Copy client-side files into your application:
xcopy AppHtml\amCharts <path to app>\AppHtml\amCharts /e /i
Either copy AppSrc/cAmChart.pkg
to your application AppSrc folder, or add AmChartsComponent as a library ("Tools > Maintain Libraries... > Add Library...").
Include the Core-JS polyfill and custom component in your index.html:
<script src="https://unpkg.com/core-js-bundle/minified.js"></script>
<script src="amCharts/index.js"></script>