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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to Display Data in Charts Guide Part 2

100% helpful (1/1)

 

How to Display Data in Charts Guide Part 2

 

Step 4: Create Thing

 

In order for the Mashup to pull data into the display, you first need to create an Entity. In this example, we utilize a Thing with an Info Table Property, as well as a Time Series Property. We’ll use the DataShape we created in the last step to format the Info Table Property. Then, we'll assign the Info Table Property some default values to display in our non-time-series charts.We will change the values of the Time Series Property (which will record them to the Value Stream) for display in our time-series charts.

 

Info Table Property

 

  1. From the Browse tab of ThingWorx Composer, click Modeling > Things+ New.
    IoTProductMgmt_10-1658782589745.png

     

  2. In the Name field, enter DDCThing.
  3. If Project is not set, search for and select PTCDefaultProject.
  4. In the Base Thing Template field, search for and select GenericThing.
  5. In the Value Stream field, search for and select DDCValueStream.
    IoTProductMgmt_11-1658782589747.png

     

  6. At the top, click Properties and Alerts.
    IoTProductMgmt_12-1658782589748.png

     

  7. Click + Add.
  8. In the Name field, enter InfoTableProperty.
  9. Select INFOTABLE from the Base Type drop-down.
  10. In the Data Shape field, search for and select DDCDataShape.
  11. Check the Persistent checkbox.
    IoTProductMgmt_13-1658782589752.png

     

First Default Value

 

  1. Check the box for Has Default Value.
    • A new DDCDataShape button will appear under Has Default Value.

IoTProductMgmt_14-1658782589754.png

2. Click the new DDCDataShape button under Has Default Value.


IoTProductMgmt_15-1658782589755.png

3. Click + Add.

4. Enter the following values for each field:

Field

Value

PrimaryKey

1

Label

A - 25%

Value

25

XAxis

1

Data

5

ASensor

5

BSensor

3

CSensor

1

XValue

1

YValue

5

BubbleValue

7

 

 

IoTProductMgmt_16-1658782589757.png

3. At the bottom-right of the pop-up, click the green Add button to apply the first Default Values.


IoTProductMgmt_17-1658782589758.png

 

Second Default Value

 

  1. Click + Add.
  2. Enter the following values for each field:

Field

Value

PrimaryKey

2

Label

B - 35%

Value

35

XAxis

2

Data

10

ASensor

10

BSensor

6

CSensor

2

XValue

2

YValue

10

BubbleValue

9

 

IoTProductMgmt_18-1658782589760.png

3. At the bottom-right of the pop-up, click the green Add button to apply the second Default Values.


IoTProductMgmt_19-1658782589762.png

 

Third Default Value

 

  1. Click + Add.
  2. Enter the following values for each field:

Field

Value

PrimaryKey

3

Label

C - 40%

Value

40

XAxis

3

Data

20

ASensor

15

BSensor

9

CSensor

3

XValue

3

YValue

20

BubbleValue

14

 

IoTProductMgmt_20-1658782589763.png

 

3. At the bottom-right of the pop-up, click the green Add button to apply the third Default Values.

IoTProductMgmt_21-1658782589766.png

4. At the bottom-right of the pop-up, click the green Save button to close the pop-up.

 

Time Series Property

 

  1. At the top-right, click the "Check with a +" button for Done and Add.
  2. In the Name field, enter TimeSeriesProperty.
  3. Change the Base Type to NUMBER.
  4. Check the Persistent checkbox.
    • Checking this box causes the last Value entered into the Property to persist through reboots of the system.
  5. Check the Logged box.
    • Checking this box causes all changes to the Property to be logged if you have a Value Stream defined to record the changes.

IoTProductMgmt_22-1658782589770.png

6. At the top-right, click the "Check" button for Done.

 

IoTProductMgmt_23-1658782589773.png

7. At the top, click Save.


IoTProductMgmt_24-1658782589775.png

 

If the DDCThing's TimeSeriesProperty changes from this point onward, it will now be recorded in the DDCValueStream. Normally, any changes would come from an Edge IoT sensor of some type, but for the purposes of this guide, we will manually change the value repeatedly to simulate these types of changes.

 

Set 5

 

  1. Under TimeSeriesProperty's Value column, click the "pencil" button for Set value of property.IoTProductMgmt_25-1658782589778.png

     

  2. In the slide-out at the top-right, enter 5.
    IoTProductMgmt_26-1658782589778.png

     

  3. At the top-right, click the "Check" button for Done.

 

Set 10

 

  1. Under TimeSeriesProperty's Value column, click the "pencil" button for Set value of property.
  2. In the slide-out at the top-right, enter 10.
    IoTProductMgmt_27-1658782589778.png

     

  3. At the top-right, click the "Check" button for Done.

 

Set 15

 

  1. Under TimeSeriesProperty's Value column, click the "pencil" button for Set value of property.
  2. In the slide-out at the top-right, enter 15.
    IoTProductMgmt_28-1658782589779.png

     

  3. At the top-right, click the "Check" button for Done.

Set 20

 

  1. Under TimeSeriesProperty's Value column, click the "pencil" button for Set value of property.
  2. In the slide-out at the top-right, enter 20.
    IoTProductMgmt_29-1658782589779.png

     

  3. At the top-right, click the "Check" button for Done.

Set 25

 

  1. Under TimeSeriesProperty's Value column, click the "pencil" button for Set value of property.
  2. In the slide-out at the top-right, enter 25.
    IoTProductMgmt_30-1658782589780.png

     

  3. At the top-right, click the "Check" button for Done.
  4. At the top, click Save.

 

Step 5: Create Mashup

 

Before we can bind the data to the various Chart Widgets, we first have to create a Mashup and add the charts to it.

  1. From the Browse tab of ThingWorx Composer, click Visualization > Mashups+ New.
    IoTProductMgmt_31-1658782589784.png

     

  2. Keep the default of Responsive, and click OK.
    IoTProductMgmt_32-1658782589785.png

     

  3. In the Name field, enter DDCMashup.
    IoTProductMgmt_33-1658782589787.png

     

  4. If Project is not set, search for and select PTCDefaultProject.
  5. At the top, click Save.
    IoTProductMgmt_34-1658782589789.png

     

  6. At the top, click Design.
    IoTProductMgmt_35-1658782589792.png

     

Divide the Mashup

 

  1. On the top-left under the Layout section, click two times on Add Left.
    IoTProductMgmt_36-1658782589794.png

     

  2. With the left-third selected in the central Canvas window, click Add Bottom.
    IoTProductMgmt_37-1658782589796.png

     

  3. With the middle-third selected in the central Canvas window, click Add Bottom.
  4. With the right-third selected in the central Canvas window, click Add Bottom.
    IoTProductMgmt_38-1658782589798.png

     

  5. At the top, click Save.

Add the Charts

 

  1. At the top-left, click on the Widgets tab.
    IoTProductMgmt_39-1658782589800.png

     

  2. Search for pie inside the Filter Widgets field in the top-left.
  3. Drag-and-drop a Pie Chart Widget onto the top-left section of the Canvas.
    IoTProductMgmt_40-1658782589802.png

     

  4. In the top-left, change Category to Legacy, and search for label chart inside the Filter Widgets field in the top-left.
  5. Drag-and-drop a Label Chart Widget onto the top-middle section of the Canvas.
    • Note that, even the Label Chart is a Legacy Widget, it will still work.

IoTProductMgmt_41-1658782589805.png

6. Change Category back to Standard, and search for proportional inside the Filter Widgets field in the top-left.

7. Drag-and-drop a Proportional Chart Widget onto the top-right section of the Canvas.


IoTProductMgmt_42-1658782589807.png

8. Search for bubble inside the Filter Widgets field in the top-left.

9. Drag-and-drop a Bubble Chart Widget onto the bottom-left section of the Canvas.


IoTProductMgmt_43-1658782589809.png

10. Search for line inside the Filter Widgets field in the top-left.

11. Drag-and-drop a Line Chart Widget onto the bottom-middle section of the Canvas.

 

IoTProductMgmt_44-1658782589812.png

12. Search for event inside the Filter Widgets field in the top-left.

13. Drag-and-drop a Event Chart Widget onto the bottom-right section of the Canvas.

 

IoTProductMgmt_45-1658782589815.png

14. Click Save.

 

Click here to view Part 3 of this guide. 

 

Version history
Last update:
‎Aug 09, 2022 03:28 PM
Updated by:
Contributors