Skip to main content
1-Visitor
September 10, 2019
Solved

Is there any way to include amcharts in Thingworx?

  • September 10, 2019
  • 1 reply
  • 3737 views

I have a requirement to include am charts in the thingworx. Is this possible by including amchart libraries and creating new custom widgets? Any insight in this would be helpful.

Best answer by Vatsal

@Constantine ,

 

Thanks for your reply. Giving the values in px was an effective way to define the size of the chart. In addition to that the size was suppose to be defined in the  runtime.css file.

 

For community,

I have included the zip file of a sample widget for future reference.

1 reply

Support
September 10, 2019

Hi @Vatsal.

 

It is possible to include these libraries to the ThingWorx platform, but not something we have tested or would support.  For creating new custom widgets, please refer to this documentation.

 

It's recommended that with any new libraries, you fully test your functionality to ensure there are no conflicts with existing libraries.

 

Regards.

 

--Sharon

Vatsal1-VisitorAuthor
1-Visitor
September 12, 2019

Thanks a lot for your reply @slangley .

I tried creating a chart widget using the amChart libraries and was able to do so.

However the rendering is not doe properly in Thingworx. I have attached the screenshots of the rendered images when the chart is made in HTML(amChartHTML.png)

amChartHTML.PNG

and when it is made in Thingworx(amChartTW.png).

amChartTW.PNG

 

I have also uploaded the runtime.js file i am using in the TW widget. In case you can identify if i am missing anything kindly let me know.

18-Opal
September 12, 2019

Hello,

 

Just few observations:

  1. It looks like the chart is squeezed into a container which is too small. This is something you can confirm by checking DOM hierarchy in Chrome Dev Tools;
  2. The chartContainer (together with the corresponding div) seems to be unnecessary;
  3. What if you try to set width on the div you render?

/ Constantine