The type of hierarchy chart shows the relationships of supraordination and subordination between the elements of a given field.

1 Example

In this example, the list of employees with their clients will be displayed.

Parameterization of the box :

  1. Graph type selector Hierarchy.
  2. SQL statement to execute, in this case:
Copy
<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>

Nota

A 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.

INPUTS:

  • 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.

2 Interaction

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.