Qlik Community

QlikView Documents

QlikView documentation and resources.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW

Tree Visualisation

s_uhlig
Partner
Partner

Tree Visualisation

The attached example shows how to build a nested set based on a hierarchical data structure and its visualization on a scatter chart.

Attachments
Comments
s_uhlig
Partner
Partner

Hi André,

it seems this option is a little misplaced.

go to the presentation tab and check "Show Legend". After that you can change the font under "Settings...".

Regards

Sven

0 Likes
Not applicable

Thank you so much for the information. This is very helpful. I have one question regarding the treeview, is there a way to place the root into the middle and parents on both side?


Thanks,

Jasmine

0 Likes
s_uhlig
Partner
Partner

Hi Jasmine,

Thanks for your feedback.

I've attached an example with some different layouts. You can take it as a starting point for your own researches.

Regards

Sven

Not applicable

This is very helpful. Thank you so much!

Jasmine

0 Likes
qlikqool
Contributor II
Contributor II

Excellent work Sven!

Do you have any concept/tutorial type info that you can share on the load script, for example explanations of some of the transformations that are established to later help determine the x/y positions in the scatter chart?

There are some clever manipulations that are a little difficult to follow.  I would like to be able to select a node in the chart but highlight the entire ancestor tree instead of just the node, any ideas?  I'm able to do this in a pivot table by using ancestors (instead of node) as a dimension.

I have grouped parts of my tree, so all VPs are tagged as VP and test engineers are part of the group 'TEST'.  When I select TEST, I would like to see the ancestors for all of these engineers all the way up to the ROOT parent 'CEO'. Lastly, I will have various flavors of the hierarchy so will have an HIER_ID field that allows me to dimension the chart by it, that is it will look cluttered initially with 3-4 hierarchies until someone selects a hierarchy. Is it best to make this HIER_ID filed part of the ancestor table itself (i.e., id, parentid,node, hier_id)? I ask this, because the conn field will also change with hier_id and I need to make sure the correct connections are retained.

Regards, John

0 Likes
s_uhlig
Partner
Partner

Hi John,

thanks for your feedback. To give you an idea of how you could respond to selections, I've attached an example to show the subtree and the path to the root for the selected node. If you have multiple hierarchies, it may help to  append them to a dedicated root-node, which could be deleted after processing.

And sorry, but no, there isn't any tutorial since this is only a small example. But the main task is to order the nodes according to pre-order tree-traversal and btw. if' you accidentally have Oracle under the hood, it's much simpler since you could use the order of its connect by statement.

Best wishes,

Sven

0 Likes
qlikqool
Contributor II
Contributor II

Sven, you're a genius!  It's almost doing what I want but still not quite.  I'll try to formulate a precise description of my observation and perhaps post some data that can try to help.

Thanks for your help!

0 Likes
qlikqool
Contributor II
Contributor II

Dear Sven, attached 3 files treeview-help and 2 xlsx files for your reference.  When I select 'STUDENT' 3 students are revealed instead of the 2 expected.  This is what I am struggling with and believe it has to do with the set expression in the chart.  Can you please help?

Also, I have attached them above because I wasn't sure how else to attach these.  Feel free to remove these from the post if it's causing grief or I can also remove these if you wish once you've taken a look.

Regards

John

0 Likes
s_uhlig
Partner
Partner

Hi John,

of cause, the set-analysis {1<...>} makes your tree independent from the current selection and only takes the left and right values into account. If you want to focus also on grp_l1 and grp_l2, you have to write something like: {1<grp_l1=P(),grp_l2=P(),...>}. But keep in mind, that only nodes with measures will be displayed.

On the other hand, you can also write {<node=,id=,conn=,...>} instead, to just ignore selections on this 3 specific fields.

Regards

Sven

0 Likes
qlikqool
Contributor II
Contributor II

Hi Sven, sorry for the delayed response; we were on Thanksgiving holidays.  I feel like I'm missing something.  I did try to add to the existing logic, both suggestions, and saw the same result.  The two nodes appear (John & Jason) but I lose the connections to maxl1-B and root.  I apologize, I need to dig into the data model to understand the components of the tree. I believe that all the nodes have measures. Its possible that I messed up the set expression, if its not too much to ask, can you please post your recommendation?

0 Likes
Version history
Last update:
‎2012-03-13 09:34 AM
Updated by: