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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Using TWX Composer Relationship Widget in Mashup Builder??

emoreira
14-Alexandrite

Using TWX Composer Relationship Widget in Mashup Builder??

Hello All,

I am about to build an application that will connect information from different data sources and one cool functionality to add is the relationship tracking as it is done in TWX composer as it works with the Thing ->Thing Template  relationship (uses this entity screen).

The idea is that each node in the tree would drive the user to the system that owns the data.

Does anybody has some idea of what I should do to do it? Do i need to start from scratch or can I reuse something?

Cheers

ewerton

ACCEPTED SOLUTION

Accepted Solutions
Aanjan
12-Amethyst
(To:emoreira)

Ewerton, I tried the D3 Tree widget, and that's the closest to the existing dependencies view -

std.JPG

State based formatting is available, so you can choose your Dependent Filed (to or from) and choose colors based on your preference.

View solution in original post

6 REPLIES 6
emoreira
14-Alexandrite
(To:emoreira)

Partially answering my own question: it seems that the D3 Network widget should do the trick but I still did not get it to work properly.

I am testing it with a network and configuring it as shown below:

The result I got is this, which is technically not wrong, but it is weird.

Also, could I change the Link Color based on some state?

Cheers

ewerton

Aanjan
12-Amethyst
(To:emoreira)

Ewerton, I tried the D3 Tree widget, and that's the closest to the existing dependencies view -

std.JPG

State based formatting is available, so you can choose your Dependent Filed (to or from) and choose colors based on your preference.

emoreira
14-Alexandrite
(To:Aanjan)

Thanks.. can you send me the configuration you used? How are them different from what I posted?

Cheers

Ewerton

Aanjan
12-Amethyst
(To:emoreira)

It's pretty much the same - I used the GetNetworkConnections service to get my data in. Here's a snapshot of the config and how it looks like on the grid -

tree.JPG

mash.png

qngo
12-Amethyst
(To:emoreira)

Hi, based on the data shown in the Grid widget, the tree shown by D3 Network seems correct. Just the orientation looks weird but it can be rearranged directly on runtime. Or you can use the D3 Tree widget to obtain the classic view.

emoreira
14-Alexandrite
(To:qngo)

Thanks guys. I will stick to the tree widget ( i did not try it cause  I thought it was a tree just like the regular widget). I will probably modify it to get the links to get them changed based on an attribute, like described here: D3.js Tips and Tricks: Tree diagrams in d3.js

Cheers

Ewerton

Announcements


Top Tags