Charts
*******

TreeSize is able to visualize folder information in several different types of charts.

The information is based on the currently active view mode of TreeSize.

Chart context tab
====================

A context tab will be activated when the chart view is selected. It allows you to manipulate the charts in several ways, for example zooming, turning on or off the grid lines, switching between 2D and 3D mode, changing colors, etc.

.. image:: /images/TreeSize-MainWindow_RibbonTab_Chart.png
   :width: 100%
   :align: center

Using the tab, you can also copy the current chart to the clipboard or save it as a file.
    
More options to individualize the charts are available with the :ref:`options-dialog`.

.. note::

    Some elements are available exclusively for certain types of charts (e.g. "Level of Details" for "treemap " charts only).

For all directory charts the following commands are commonly available:

Pie Chart
~~~~~~~~~~~~~~~

Switches to pie chart view.

Bar Chart
~~~~~~~~~~~~~~~

Switches to bar chart view.

Treemap Chart
~~~~~~~~~~~~~~~

Switches to hierarchical chart view.

Export chart
~~~~~~~~~~~~~~~

Saves the current chart as a graphic file.

Email
~~~~~~~~~~~~~~~

Export the current chart and send it via email. You can configure your email settings in options dialog.

Copy Chart to Clipboard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Copies the current chart to the clipboard (can be pasted in other applications).

Print right pane
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Prints the current chart.

Color
~~~~~~~~~~~~~~~
Use the color picker to choose a color for the chart below: select a color, then click on the part of the pie the color should be applied to.

Show chart in 3D
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View chart in 3D or 2D.

Zoom in
~~~~~~~~~~~~~~~

Zooms in on the chart.

Zoom out
~~~~~~~~~~~~~~~

Zooms out of the chart.

Zoom 100%
~~~~~~~~~~~~~~~

Resets zoom to 100%.

Additional options available
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Pie charts
^^^^^^^^^^^^

**Show Free Space**: Show the free space of a drive as additional slice.

Bar charts
^^^^^^^^^^^^

**Show Grid**: Show or hide grid lines for this chart.

Treemap chart
^^^^^^^^^^^^^^^

**Level of detail**: Change the detail level of the treemap chart.

**Show Free Space**: Show the free space of a drive as a separate tile.

**Included elements**:

The treemap chart allows you to specify which elements should be included with the chart. The size of each tile represents the size of the according element (usually the summarized size of the contained files), just as for folders.

Activating more than one type of elements to be included, a hierarchical structure will be implied: Each file belongs to an extension, each extension belongs to a file type group, and each group belongs to a folder.

The legend of the chart will adapt to the selected elements. There are several options available:

- **Show single files**: Include a separate tile for each file.
- **Show extensions**: Include a separate tile for each extension contained within a folder.
- **Show file type groups**: Include a separate tile for each file type group contained within a folder.

Context menu
==============

Right-clicking on any chart shows a popup menu offering additional features, such as opening the corresponding item in the Windows Explorer.

Pie chart
===========

The Pie Chart shows the relative portions of each subfolder of the currently selected item in the Directory Tree.

.. image:: /images/TreeSize-MainWindow_Chart.png
   :width: 100%
   :align: center

The diagram contains the name of each folder, its size (or allocated space, or number of files like explained in :ref:`view-menu`), and its percentage value. Small folders may be summarized in a slice named "Other".

If a root of any drive is displayed in a pie chart and you have switched to the "Allocated Space" mode, the free space of this drive will also be displayed as one slice of the pie. This behaviour can be switched on or off in the options menu.

The pie chart shows the free space as one slice among the others and calculates the percentage appropriately (relatively to the others), so the percent value might differ from the "% Free" value of the drive if TreeSize didn't see all files.

Hovering over a slice will show detailed information about the corresponding folder, double-clicking will change into the selected folder.

In case the clicked slice represents a file, it would be executed. Right click a slice in order to perform file operations like delete, copy, paste, properties etc.

To manage several folders at once, hold the shift key while selecting the desired segments in chart.

.. note:: 
    The Pie Chart not only visualizes the sizes of each subfolder of the currently selected item in the Directory Tree, but also the distribution of file extensions and even the file and directory owners (user statistics).
    
    To change the type of the Pie Chart, please click on the drop-down arrow right beside the caption of the Ribbon button.

.. image:: /images/TreeSize-MainWindow_PieChart_Types.png
   :width: 100%
   :align: center

Bar chart
===========

The Bar Chart visualizes folder sizes in form of horizontal bars.

.. image:: /images/TreeSize-MainWindow_BarChart.png
   :width: 100%
   :align: center

They allow easy determination of folder sizes and comparison of each folder in relation to other folders on the same directory level.

As with the pie chart, hovering over a bar will call up more detailed information about the corresponding folder. Double-clicking on a bar will show the bar chart view for the selected folder.

Treemap chart
===============

The treemap chart is a hierarchical chart that is able to visualize the sizes of each subfolder (not only direct child folders) of a selected directory branch.

.. image:: /images/TreeSize-MainWindow_TreeMap.png
   :width: 100%
   :align: center

Each folder is shown as a rectangle. The area of the rectangle represents the size of the corresponding folder. The rectangles of subfolders are located inside the rectangle of their parent folder.

If a folder has no subfolders and the file extensions statistics was activated during the scan (:ref:`extensions`), the file types are now shown as subitems.

The color of the rectangle face indicates the directory level. The colors range from a darker blue (top level directories) to a lighter blue (directories with a deep file system level).

These colors can be adjusted using the color picker in the context tab. The context menu of the treemap chart also allows you to apply a predefined color scheme.

The shown rectangles must have a minimum size to be displayed. You can customize this minimum value using the level of detail track bar in the context tab. If this value is small, the chart might look very complex and confusing.

If you place the mouse cursor over the chart, you will see a tooltip containing information about the directory the cursor hovers over.

Double-clicking on one of the rectangles will navigate to the corresponding directory in the Directory Tree.

.. note::
    
    Drag and drop operations are supported in the treemap chart.