In this example, the list of employees with their clients will be displayed.
Parameterization of the box :
- Graph type selector Hierarchy.
- SQL statement to execute, in this case:
<union type='all'> <select> <columns> 'E' || EmployeeId <alias name='id'/>, FirstName || ' ' || LastName <alias name='name'/>, </columns> <from table='Employee'> </from> </select> <select> <columns> 'C' || customerid<alias name='id'/>, FirstName || ' ' || LastName <alias name='name'/>, 'E' || supportrepid <alias name='parent_id'/> </columns> <from table='customer'> </from> </select> </union>
NotaA letter has been added in front of the id to avoid interference between the ids of employees and those of customers
* starting from the table of employees his clients have been searched.
- id: Identifier of the element.
- name: Element name.
- parent_id: Identifier of the parent father. If you do not have a parent, this field will be empty.
Each entry contains a new element, and the necessary information to know its origin.
In this type of graph the user can interact to hide or show the descendants of each of the nodes.
- (1) Show / Hide descendants: When you click on the ball next to each element if it has descendants, they will appear or hide.
- (2) Zoom: You can zoom or move the graphic on the screen, to focus attention on the area of interest.