1.7. Replacing AmCharts Version
An instance of AmCharts library included in CUBA platform can be replaced with another one. To do this:
-
Download charts and stock charts from AmCharts site.
-
Merge
amcharts
folder from both archives into one. -
Copy
amcharts
folder to{project.rootDir}/modules/web/web/VAADIN/resources
-
Redeploy the application.
To use new attributes added in a new version you need to set custom JSON in your screen controller as shown below.
CubaAmchartsScene cubaAmchartsScene = (CubaAmchartsScene) WebComponentsHelper.unwrap(chart);
cubaAmchartsScene.setJson("{\"valueScrollbar\":{\"autoGridCount\":true}}");