OL Learn

amCharts full functionality

Connect Design uses the amCharts js library for charts and graphs. However, even in Web Context, the charts out of Connect are static. Are there any plans to provide the full functionality of the amCharts library in Connect? I’m looking for animations, interactions, events.

Extra amChart settings can be added using the Source view of the Chart Properties dialog. You could also use a script change the respective settings. An example is discussed in the following thread:

In Connect charts are rendered server side, which prob explains why you don’t see animations. The web browser does not have access to the scripts of the merge enginge. Note Connect engeins currently use amChart version 3.

I assume you are creating web pages. When in need of animations one could link the respective libraries via the JavaScripts folder in the Resources panel. For example by using a Remote JS file and link to the respective library on a CDN. These scripts are accessible for the web browser and will be cached. The challenge is exposing the data from Connect to the client side script. This could be achieved by writing the respective data in JSON format on an data attrbiute of an element as part of the merge process. I’ll create a simple sample showing this approach and post it here shortly.

The promised sample template. An user script is used to grab the data from a detail table and writes this in JSON format on the data-chartdata attribute of the <div> element. A client side script (residing in the template) instantiates the amChart object and reads the parked data.

amChart-web-sample.OL-template (9.2 KB)

1 Like

Could you link the data mapper, too, please?

My bad, attached my sample data file (JSON format). I imported this via the Sample Data Editor of the Data Model panel (so I have no Data Mapper).

chart-data.zip (818 Bytes)


Will investigate that but things should work properly when viewing it in an external web browser. Can you confirm that? [internal reference SHARED-86640]

Running live I get a blank white square:

Try the template attached. I’ve added the cdn links to the amchart library to the end of the source and removed the JS resources. I got this workingin OL Connect Workflow and make sure to uncheck embed all resources.

amChart-web-sample.OL-template (8.3 KB)

“This template was created in a later version of Connect, and cannot be opened in this version.”

This is after upgrading both Workflow and Connect to 2022.1, and that same error is thrown in Workflow and when trying to open it in Connect Design.

My bad, installed a post 2022.1 build on my end ;). Here is the template for 2022.1: amChart-web-sample.OL-template (8.5 KB)