Skip to main content
1-Visitor
August 22, 2019
Solved

Customizing XY Chart widget

  • August 22, 2019
  • 1 reply
  • 2107 views

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.

Best answer by kahmeng96

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.

1 reply

17-Peridot
August 22, 2019

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?

kahmeng961-VisitorAuthor
1-Visitor
August 22, 2019

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.