Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

Creating treemaps

Treemaps display hierarchical data by using nested rectangles, that is, smaller rectangles within a larger rectangle.

You can create a treemap on the sheet you are editing.

  1. In a sheet, click to add a new visualization.
  2. Under Visualization, select Treemap.
  3. Click Add and select a field or master dimension. This should be the highest level in the hierarchy. It will be displayed as the main group in the chart.
  4. Optionally, click Add and select a field or master dimension to set the rectangles within the group. If you add a third dimension, it will instead be used as a second level of grouping.
  5. Optionally, click Add and select a third field or master dimension to define the rectangles.
  6. Click Add and select a measure or master measure to define the size of the rectangles.

In a treemap you need at least one dimension and one measure, but to make full use of the treemap it is preferable to have two or three dimensions. You can only have one measure, but up to 15 dimensions. We do not recommend using more than three dimensions as the treemap may become unmanageable.

When you have created the treemap, you may want to adjust its appearance and other settings in the properties panel. For information about styling, see Styling the treemap. For information about customizing other aspects of the chart's appearance, see Changing the appearance of a visualization.

Styling the treemap

With Advanced options turned on, you have a number of styling options available under Appearance in the properties panel.

Click Styling under Appearance > Presentation to further customize the styling of the chart. The styling panel contains various sections under the General and Chart tabs.

You can reset your styles by clicking next to each section. Clicking Reset all resets styles for all available tabs in the styling panel.

For general information about styling an individual visualization, see Applying custom styling to a visualization.

Customizing the text

You can set the text for the title, subtitle, and footnote under Appearance > General. To hide these elements, turn off Show titles.

The visibility of the different labels on the chart depends on chart-specific settings and label display options. These can be configured in the properties panel.

You can style the text that appears in the chart.

  1. Click Advanced options.

  2. In the properties panel, expand the Appearance section.

  3. Under AppearancePresentation, click Styling.

  4. On the General tab, set the font, emphasis style, font size, and color for the following text elements:

    • Title

    • Subtitle

    • Footnote

  5. On the Chart tab, set the font, font size, and any other applicable properties for the following text elements:

    • Header labels: Style the header labels. You can customize the font, font size, and color.

    • Leaf labels: Style the labels for the leaf elements.

    • Legend title: Style the title of the legend. You can customize the font, font size, and color.
    • Legend labels: Style the labels of the individual legend items. You can customize the font, font size, and color.

Customizing the background

You can customize the general background and the background of the header area. The general background can be set by color and image, while the background of the header area can be set to a single color.

In the styling panel, you can configure background options.

Setting the general background

The general background of the chart includes the title area, as well as the chart itself, which might be partially covered by the header.

  1. Click Advanced options.

  2. In the properties panel, expand the Appearance section.

  3. Under AppearancePresentation, click Styling.

  4. On the General tab of the styling panel, you can select a background color (single color or expression). You can also set the background to an image from your media library or from a URL.

    Information note

    To add a background image from a URL, the URL's origin needs to be added to the allowlist in your tenant's Content Security Policy. The origin must be added with the following Directive: img-src. This is done by a tenant administrator.

    For more information, see Creating a CSP entry.

    When using a background color, use the slider to adjust the opacity of the background.

    When using a background image, you can adjust image sizing and position.

Setting the header background

The header area is a branch-like frame surrounding the hierarchy of rectangles when two or more dimensions are added to the chart.

  1. Click Advanced options.

  2. In the properties panel, expand the Appearance section.

  3. Under AppearancePresentation, click Styling.

  4. On the Chart tab of the styling panel, select a background color under Header background color.

Customizing the border and shadow

You can customize the border and shadow of the chart.

  1. Click Advanced options.

  2. In the properties panel, expand the Appearance section.

  3. Under AppearancePresentation, click Styling.

  4. On the General tab of the styling panel, under Border, adjust the Outline size to increase or decrease the border lines around the chart.

  5. Select a color for the border.

  6. Adjust the Corner radius to control the roundness of the border.

  7. Under Shadow in the General tab, select a shadow size and color. Select None to remove the shadow.

Related learning:

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!