I am aware that AmCharts is one of the COM objects used in Connect already to drive the Bar and Line charts but I am trying to create a Waterfall chart for one of my templates.
I have imported a JS library for the AmCharts Waterfall Chart, included in the Print Section that I am trying to make it work on and then have called the function which generates a Waterfall chart in a second JS file called mychart.js which points to a class selector in the Print Section.
Something clearly is trying to happen but I get the error:
While i didn’t get it working in the print section, it does work in the web section. Perhaps you can test your work in a web section too, because my template proves it can work there. With the web section active, you should be able to see the graph in the live tab or you can see it in the external browser. I hope the example gives you some pointer for your template.
The template uses remote javascripts (amcharts.js and serial.js), but you could replace them with local javascripts if you have them.
From the error it looks like you may still be missing a library, or perhaps you are trying to set or use an attribute that is not supported. Some points to keep in mind:
as mentioned, make sure the libraries and javascripts you use are included (right mouse button on the section, choose includes).
the graphs usually don’t show when the they contain “startDuration”: 1, make sure startDuration is set to 0. There is a technical reason why this is the case.