Kibana Guide: Proportion and Distribution Charts

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

Checked on 2026-11-11 against Kibana 9.5.x.

What you build

You add two panels to the dashboard Bookshelf (guides): a donut that shows what share of the Bookshelf log records each URI has, and a heat map that shows how busy each URI is over time. On the way you draw the same data as a pie, a treemap, a waffle, a mosaic and a tag cloud in the Lens editor, so that you see what each chart is good at and when it is the wrong choice.

Finished Kibana dashboard Bookshelf (guides) in view mode with a donut of the log records by attributes.uri and a heat map of the requests per attributes.uri over time

Before you start

  • Start the Kibana profile of the hands-on lab and wait about a minute:

    cd lab
    docker compose --profile kibana up -d
  • Open http://localhost:5601 and sign in as elastic with the password lab-elastic-password. When Kibana opens its full-screen welcome page, click Explore on my own.

  • Do the guide Create a dashboard and the first Lens panel, which creates the dashboard Bookshelf (guides) and shows the maps of the Lens editor and of a dashboard in edit mode. Do the guides on time series charts and on metric, gauge and table too if you want the dashboard to carry their panels; this guide does not need them. It needs the data view Bookshelf logs (guides), with the index pattern logs-generic.otel-default and the time field @timestamp.

  • The load generator sends traffic to the Bookshelf service in its default mode, which fills the log data stream. Lens needs no licence beyond the basic one; the lab runs a trial licence anyway.

  • The guide was checked on Elasticsearch and Kibana 9.5.6. The figures are drawings of the Kibana 9.5 user interface, not screenshots, so small details can differ from your screen; the chart type list and the names of the drop zones of the partition charts and of the heat map are drawn from the Elastic documentation. A highlighted box with a number marks the control of the step with the same number.

Steps

The guide works in the Lens editor and on a dashboard in edit mode. The screen maps of both are in the first dashboard guide; come back to them when a control is not where a figure shows it. Whenever Lens leaves a dimension empty after you change the chart type, drag the field onto the dashed button again: the types keep what they can and ask for the rest.

Open the dashboard in edit mode

  1. Open Dashboards in the primary navigation and click Bookshelf (guides).

  2. Click Edit in the second bar.

    Kibana dashboard Bookshelf (guides) in view mode with its bar chart panel; the Edit button of the second bar is marked by callout 2
  3. Click Add in the second bar. The Add to dashboard flyout opens.

  4. In the flyout, click Visualization ("Build charts, metrics, and tables with a point-and-click editor."). Visualization (query) is the ES|QL editor of the next guide.

    Dashboard in edit mode with the Add to dashboard flyout open: the Add button of the second bar is marked by callout 3 and the Visualization entry of the flyout by callout 4

Build a pie and a donut

  1. Lens opens. Check that the Data view picker shows Bookshelf logs (guides). Open the chart type list with the button of the layer card, which shows Bar, and choose Pie.

    Lens editor with an empty workspace and the chart type list open under the Bar button of the layer card; the entry Pie is marked by callout 5
  2. In Search field names, type uri. Drag the field attributes.uri onto the dashed Slice by button, so that each URI becomes one slice.

  3. Drag the entry Records, above Available fields, onto the dashed Metric button. Lens shows it as Count of records and draws the pie.

    Lens editor with the chart type Pie, the field list narrowed to attributes.uri and Records; the field is dragged onto the dashed Slice by button (callout 6) and Records onto the dashed Metric button (callout 7)
  4. Open the chart type list again and choose Donut. The slices keep their data and the centre of the chart opens. Pie and donut show the same numbers; the donut leaves room for a total in its hole and is easier to read next to other panels.

    Lens editor with a pie chart of the log records by attributes.uri and the chart type list open; the entry Donut is marked by callout 8
  5. Click Save and return. The dashboard is back in edit mode with the donut as a new panel.

    Lens editor with a donut chart of the log records by attributes.uri; the Save and return button of the second bar is marked by callout 9

Try a treemap, a waffle, a mosaic and a tag cloud

  1. Click Add and then Visualization again, as in steps 3 and 4. A new Lens editor opens with an empty workspace.

  2. Open the chart type list and choose Treemap.

    A new Lens editor with an empty workspace and the chart type list open; the entry Treemap is marked by callout 11
  3. Drag the field attributes.uri onto the dashed Slice by button.

  4. Drag the field attributes.status onto the second dashed Slice by button, which appears once the first one is filled. Each URI tile is now split by status, so a small tile for 404 sits inside the tile of every URI.

  5. Drag Records onto the dashed Metric button. The treemap draws one tile per URI, sized by the count, and splits it by status.

    Lens editor with the chart type Treemap: attributes.uri is in the first Slice by button (callout 12), attributes.status is dragged onto the second dashed Slice by button (callout 13) and Records onto the dashed Metric button (callout 14)
  6. Open the chart type list and choose Waffle. A waffle draws 100 squares and colours as many as each value’s percentage, which makes a share such as 12 per cent of status 404 easy to count.

  7. Open the list again and choose Mosaic. A mosaic draws one column per value of the first dimension, as wide as its share, and stacks the second dimension inside it, so it shows two proportions at once.

  8. Open the list again and choose Tag cloud. A tag cloud writes each value of the first dimension as a word sized by the metric. It is decorative: the sizes cannot be read as numbers.

    Lens editor with a treemap of attributes.uri and attributes.status and the chart type list open; the entries Waffle, Mosaic and Tag cloud are marked by callouts 15, 16 and 17, one for each time the list is opened

Build a heat map and save it

  1. Open the chart type list and choose Heat map.

    Lens editor with a tag cloud of the attributes.uri values and the chart type list open; the entry Heat map is marked by callout 18
  2. Drag the field @timestamp onto the dashed Horizontal axis button, so that time runs from left to right.

  3. Drag the field attributes.uri onto the dashed Vertical axis button, so that each URI is one row. The cell value is the count of records; if the cell value button is empty, drag Records onto it.

    Lens editor with the chart type Heat map: the field @timestamp is dragged onto the dashed Horizontal axis button (callout 19) and attributes.uri onto the dashed Vertical axis button (callout 20); the Cell value button holds Count of records
  4. Each cell is now one time bucket of one URI, and darker cells have more records. Click Save and return.

    Lens editor with a heat map of the requests per attributes.uri over time; the Save and return button of the second bar is marked by callout 21

Save the dashboard

  1. The dashboard shows the donut and the heat map in edit mode (the figure leaves out the bar chart of the first guide). Click Save in the second bar.

  2. Click Exit edit to return to view mode.

    Kibana dashboard in edit mode with the donut panel and the heat map panel; the Save button of the second bar is marked by callout 22 and the Exit edit button by callout 23

Check the result

Open Dashboards and then Bookshelf (guides). The dashboard must show the donut with one slice per URI and the heat map with one row per URI and one column per time bucket. The shares in the figures are examples; the numbers on your screen depend on how long the lab has been running.

Change the traffic and press Refresh to see the panels react:

curl -X POST localhost:8090/mode/failing

Within about a minute the counts per URI move, because the load generator writes error lines in this mode. Restore normal traffic afterwards:

curl -X POST localhost:8090/mode/normal

Variations

  • Break the donut down by attributes.status instead of attributes.uri to see the share of 200 and 404, and compare it with the waffle.

  • Add severity_text as a second slice dimension of the treemap to see the share of INFO and ERROR lines per URI.

  • Change the heat map to attributes.status on the vertical axis to see when the 404 lines cluster in time.

When each chart is the wrong choice:

Chart Wrong when Use instead

Pie and donut

There are more than about five slices, the slices are close in size, or you want to follow the values over time.

A bar chart sorted by size, or a table.

Treemap

You need exact values, or the tiles are very unequal: the small ones become unreadable.

A table with a bar next to the number, or a bar chart.

Waffle

There are many categories, or the shares are tiny: a value below 1 per cent has no square.

A metric with a percentage, or a bar chart.

Mosaic

Readers are not used to it, or one of the two dimensions has many values.

Two donuts, or a stacked bar chart.

Heat map

You need the exact number of a cell, or the colour range is not fixed, so that two heat maps cannot be compared.

A table, or a line chart with a few series.

Tag cloud

The values must be compared or ranked.

A table sorted by the count.

What can go wrong

Symptom Cause Fix

The chart type list does not show Waffle or Tag cloud in the place of the figure

The list is grouped or ordered differently in your Kibana version.

Look for the name in the whole list; the names are the ones of the Elastic documentation.

The chart is empty after you change the chart type

Lens could not carry a dimension over to the new type.

Drag the field onto the dashed button of the new type again.

A slice named Other appears

Lens shows the top values of the field only and folds the rest into Other.

Open the dimension and raise the number of values, or accept the grouping.

The heat map has one single colour

All cells have nearly the same count, or the time range is too short to make buckets.

Widen the time picker, for example to Last 1 hour.

The workspace says that no results were found

The time picker covers Last 15 minutes and the load generator or the Bookshelf service is stopped.

Check the mode with curl localhost:8090/, send curl -X POST localhost:8090/mode/normal and press Refresh.

Clean up

Keep the dashboard: the following guides extend it. To remove it with everything else the lab stores, stop the profile with docker compose --profile kibana down -v, which also deletes the volumes and therefore the dashboard.

Where to go next