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

Creating chart in Thingworx

Highlighted
Participant

Creating chart in Thingworx

Hello,

I am developing Thingworx web application that reads different sensor data being published over an MQTT protocol. I subscribe to a topic and getting the values displayed on a Gauge widget.

Now, I want it to form a chart based on the sensor data being received. I watched the "how to create and configure chart widget" video given in the developer community where they are getting an option of GetStreamEnterieswithData in the Add data section. I am not getting that option. I don't know where I am going wrong.

I am getting the data in the Gauge but I also want it on the chart. Please help me with proper steps on how to configure chart widget with MQTT??

Thank you!

13 REPLIES 13

Re: Creating chart in Thingworx

You need to either

1. use the MQTT topic updated to parse out data and write that to a Stream

2. use the MQTT topic updated to parse out data and write that to actual properties and log those

then you can use the Stream or ValueStream to populate your chart with historical data.

Re: Creating chart in Thingworx

I did exactly what you told in the second comment. Data from MQTT server being parsed in the properties and logging it. Then using value stream to populate the chart. I am getting data on the label but not on the chart. If I set the value manually from the properties, it gets plot on the chart but not from the data received over MQTT. I am getting the same data on the label without any issues.

Here are the screenshots of my project. Please let me know where I am going wrong. Thank you

Screenshot (325).pngScreenshot (330).pngScreenshot (327).pngScreenshot (331).pngScreenshot (328).pngScreenshot (329).png

Re: Creating chart in Thingworx

Did you set the X and Y axis for the Chart?

hard to tell for sure, but as far as I can tell everything looks to be done correctly.

Re: Creating chart in Thingworx

In the Time Series Widget properties section left-hand side below, I am getting an option of a timestamp in XAxis field and property name in the Data Field1. Please see the screenshots for better understanding. Thank you!Screenshot (332).pngScreenshot (333).png

Re: Creating chart in Thingworx

All of it looks correct, you are saying this isn't displaying the series??

Re: Creating chart in Thingworx

It displays on the label but not on the chart until values entered manually from the properties as shown in the screenshots below.

Screenshot (335).png

Re: Creating chart in Thingworx

From what you are saying, the logging is not working?

So the MQTT sub is receiving updates and you are processing those and writing those to the property, but for some reason they aren't being logged?

Re: Creating chart in Thingworx

yes, it seems so. Getting single values on label and gauge but not on chart even though checked persistent and logged in the property. I don't know where I am going wrong.

Re: Creating chart in Thingworx

Persistence is not required btw, but shouldn't impact the logging either.

For now set the DataChange to Always vs Value and see if that makes a difference.

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________