The 'Circle Pack' chart presents hierarchycal data using circles instead of a tree-like structure like the one used in the hierarchy chart. This provides a faster, easier way to visualize the magnitude of each node of the hierarchycal structure. The data input to this chart is the usual hierarchycal structure used in the other types of hierarchy charts (treemap, sunburst and bilevel).
1.1 Parametrization of the box
The creation is similar to every other SQLGraph :
- Select Circle Pack in the Type dropdown menu under Properties.
- Insert the Select statement that will result in the data to display in our chart. The structure of this select is described next.
1.2 Requirements for the data structure
The chart will try to build a hierarchycal structure based on the order of the columns selected, nesting from left to right. In our example, since a state has multiple cities and a city can have multiple companies.
Also, it is required an integer column at the end of our select, in order to display the magnitude of each node of the hierarchycal structure. In our case, this will be the revenue of each company. Therefore, the final sql statement will be :
<select> <columns> state, city, company, value </columns> <from table='studio_d3_hierarchy'/> </select>
In the Circle Pack chart, we can navigate to the direct children of each node with clicking on the circle containing such descendant :