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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Unable to display root of the tree in Tree widget

BhavyaPC
12-Amethyst

Unable to display root of the tree in Tree widget

Hi,

 

I'm using tree widget which will get input in a dynamic way.

 

I have used State as root element of tree, District, Substation and some other as children of the tree, Based on the user organization level of the user, I'm filtering the data and passing as input to the tree.  such as Bangalore is district I have Koramangala and HSR are 2 substations/divisions. It has other sub elements. 
I have attached the output.

But expected output has to be like the root element and the below tree structure under the root.

 

Is there any possibilities to display tree structure including root element??

 

Thanks in advance

6 REPLIES 6
PaiChung
22-Sapphire I
(To:BhavyaPC)

You aren't showing the actual table of information, but usually you would have a 'ID' with the Root name and it's 'ParentID' value would be null

or if you look at Thingworx networks it would be a To with a null From

BhavyaPC
12-Amethyst
(To:PaiChung)

@PaiChung , sorry for not sharing infotable earlier.

 

Since I Didn't get root element in the tree Earlier I have added one more row, same as root element but there is no use of doing so.

It's working fine with Collapsible D3 tree widget but not with tree and D3 tree widget.

I can't use Collapsable D3 tree widget because it will grow horizontally, which will not fit for my requirement.

PaiChung
22-Sapphire I
(To:BhavyaPC)

I see you have the root listed twice, that might potentially cause an error.

BhavyaPC
12-Amethyst
(To:PaiChung)

There is no error, it's absolutely working fine with CollapasibleD3Widget. I have added the first line just for testing.

PaiChung
22-Sapphire I
(To:BhavyaPC)

Run the mashup with the developer tool open, are there any errors listed?

abarki
15-Moonstone
(To:PaiChung)

Hi @BhavyaPC

 

Quick follow-up.

Are you still facing the issues? If yes, kindly provide reply to @PaiChung's question.

If the issue is fixed, kindly provide the solution, this will benefit other community members.

 

Thank you.

Asia 

Top Tags