cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing XY Chart widget

SOLVED
Highlighted
Amethyst

Customizing XY Chart widget

Hi all,

I want to customize the XY Chart in ThingWorx such that the x-axis is on the top of the chart and the intersection with the y-axis is in the top left corner instead of the bottom left corner. The x-axis values should increase from left to right and the y-axis values should increase from top to bottom

 

To do so, I tried to create my own XY chart widget to mimic the built in XY chart widget so that I do not overwrite the existing built-in XY chart widget. I have the necessary code of the built-in XY chart widget so I just needed to create another widget via Eclipse, copy and paste the code and import it to ThingWorx. The import is successful but I get an error when loading the mashup saying "XYChartV2Mashup opened with errors" so the widget doesn't get imported at all. I have attached the zip file containing the necessary files, it would be great if someone can help me find out why my widget isn't imported or suggest another solution to my problem.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Customizing XY Chart widget

Hi @PEHOWE

 

I checked the log again and I found this error, "ERROR: TW.ChartLibrary.removeDiscardedProperties() is not a function". After I removed this line, the widget was imported successfully and displayed in the list of widgets.

5 REPLIES 5

Re: Customizing XY Chart widget

Hello @kahmeng96 

Have you reviewed the document ThingWorx Extension Development Guide

 

In this guide on page 12, they provide the structure of the ZIP file and the Metadata.xml file. The file you have uploaded only seems to contain the information on the UI.

I tried to do the import on my local install and it imports but nothing new is added to the list of widgets?

Re: Customizing XY Chart widget

Hi @PEHOWE, thanks for the reply. You are correct, it imports but nothing new is added to the widget list. However, the zip file which I have attached already contains the ui and the metadata.xml file so I'm not sure why the widget is not appearing.

Re: Customizing XY Chart widget

Hi @PEHOWE, I have managed to import my new widget and it shows on the ThingWorx platform now, but there's another issue. After binding the necessary data, nothing is displayed when I view my mashup. I'm suspecting that the TW.ChartLibrary is missing but I'm not sure as well. Would be great if anyone can help!

Re: Customizing XY Chart widget

@kahmeng96 ,

What updates did you make to get the widget to appear in the list of widgets?

Re: Customizing XY Chart widget

Hi @PEHOWE

 

I checked the log again and I found this error, "ERROR: TW.ChartLibrary.removeDiscardedProperties() is not a function". After I removed this line, the widget was imported successfully and displayed in the list of widgets.