Skip to main content
1-Visitor
September 5, 2020
Question

Dynamic SQL Data in a Label Chart with SQL query from service

  • September 5, 2020
  • 1 reply
  • 2761 views

Hello,

I am looking for a solution where I need to display the Data from a SQL Table(with only 3 columns) on a Label Chart, only top 5 rows(with dynamic data) needs to displayed and this table keeps on updating at every 10 minutes. I am able to display that on a  Grid Widget but can't find a solution for Label Chart Widget. Have already referred the guide from Developer Portal with this link but couldn't find the solution,as it mentions only static data from InfoTables. https://developer.thingworx.com/en/resources/guides/display-data-charts . Any inputs would be highly appreciated.

SQL Query.png 

anshunagdev_0-1599300375913.png

Mashup with Grid Widget & Label Chart Widget

anshunagdev_1-1599300499577.png

 

Regards,

aNagdev

 

 

1 reply

5-Regular Member
September 8, 2020

What if you store the SQL result in a Datatable entity and then extract it to a Label chart?

 

Don't you need to record the SQL result in TWX side? 

1-Visitor
September 8, 2020

Hi @zyuan1 . Thanks for the input. This data will not be stored at ThingWorx side. This application has no provision to store data at the ThingWorx end. All the data in this application is real-time data from control system except this only SQL table data which is being updated continuously at every 10 Minutes in SQL. 

That is the reason why the content is dynamic in SQL table i.e. top five rows can have different alarms & different counts value.

 

      

5-Regular Member
September 9, 2020

If it will not store in a Datatable, can you try store the data in an infotable property, and then retrieve the data from this property?  Just want to check if there's a intermidiate storage, the chart would work.