1.7. Replacing AmCharts Version

An instance of AmCharts library included in CUBA platform can be replaced with another one. To do this:

  1. Download charts and stock charts from AmCharts site.

  2. Merge amcharts folder from both archives into one.

  3. Copy amcharts folder to {project.rootDir}/modules/web/web/VAADIN/resources

  4. 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}}");