Documentation for using AmCharts in template

Hi - I am wondering if there is any documentation that would help me to use AmCharts in my template. I am trying to work with a line chart and need to change the colors of the lines. I went to the AmCharts website but not sure how to use it in my template.

Thank You

What you need in any case is the documentation on the AmChart website (amDocs), and modifying or adding properties on a certain Chart you best use a script for (put after the chart script) with its selector set on the chart’s id.

This script is loading the chart’s json object with all the chart’s properties, then doing the changes (whatever you need) and finally writing back the modified json data to the chart like following:

var params = JSON.parse(results.attr("data-params")); //load current properties

//adding properties, e.g. setting value label color:

params.amValueAxis.color = "red";

results.attr("data-params", JSON.stringify(params)); //write back properties

If you are unsure about the JSON data structure you could put first your chart on your page and preview that in a web browser where you can inspect the html code to get the details (e.g. using DevTools in Firefox).

That’s all not done easily and presumes good knowledge on JS and JSON.

I guess in a future version of Connect there will be more GUI based elements available for better chart configuration.

Hi Martin,

I see this post was flagged possibly because it was a double post. Here is the other post.

Just a FYI.

EDIT: Perhaps they should be merged?

Regards,

S