Box plot

Updated at:

A box plot displays the distribution of one or more sets of continuous data. It provides a visual summary that helps you identify data skewness and outliers at a glance. This topic describes how to add data to a box plot and configure its style.

Prerequisites

You have created a dashboard. For more information, see Create a dashboard.

Chart overview

A box plot uses six statistical measures to describe the distribution of data: the upper edge, upper quartile, median, lower quartile, lower edge, and outliers. This helps you quickly identify distribution trends in the data.image

  • Upper and lower edges: Represent the range of the data distribution. For details on how they are calculated, see Whisker calculation method in this topic.

  • Upper quartile (Q3): The value that is greater than 75% of the values in the dataset.

  • Median: The middle value in the dataset, which is greater than 50% of the values.

  • Lower quartile (Q1): The value that is greater than 25% of the values in the dataset.

  • Outlier: A value that is below Q1-1.5*IQR or above Q3+1.5*IQR.

Use cases

Common use cases for a box plot include:

  • Data distribution analysis: For example, comparing salary levels across different regions or temperature distributions in various geographic areas.

  • Outlier detection: For example, auditing transaction amounts for unusually large or small values.

  • Quality management: For example, monitoring the distribution range of product features to ensure consistency.

  • Central value and skewness detection: For example, analyzing sales figures in different regions to understand the average value and range of fluctuation.

Benefits

  • Calculation capabilities: Supports multiple rules for whisker calculation, offers advanced calculations (such as cumulative totals, period-over-period comparisons, and Top N), and supports adding smart reference lines.

  • Visualization effects: Lets you adjust chart styles and add auxiliary elements, such as a legend, thumbnail axis, and tooltips, to create intuitive displays.

  • Data comparison and annotation: Supports period-over-period comparisons for data with different dimension values.

  • Annotation capabilities: Lets you add custom notes and endnotes, and supports jumps to external links, enabling interaction between your data and other systems.

  • Interactive operations: Includes dimension/measure filtering and in-table filtering.

Example

image

You can extract the following insights from a box plot:

  • Central tendency: The median reflects the center of the data.

  • Dispersion: The length of the box indicates how concentrated or dispersed the data is.

  • Skewness: The relative length of the whiskers (the lines extending from the box) indicates if the data distribution is skewed.

  • Outliers: Marked points outside the whiskers highlight the presence of outliers.

  • Range: The span from the lowest to the highest value, including outliers, shows the overall data range.

Configure chart fields

This section uses an analysis of annual order amounts as an example to explain how to configure fields.

  1. On the Data pane, select the dimension and measure fields you need. Double-click or drag them to the appropriate areas on the Fields tab.image

    • In the category axis/dimension well, add a dimension to compare data based on your analysis needs.

      In this example, drag the report_date(year) field to this well to compare order amounts by year.

    • In the value axis/measure well, add the primary measure for the chart.

      In this example, drag the Order Amount field to this well as the primary measure for analysis.

    • In the distribution granularity/dimension well, specify the level of detail for your analysis. The system generates data points based on this distribution granularity, which are then used to construct the box plot.

      In this example, drag the Region field to view the distribution of order amounts by region.

    • To further break down the comparison, you can add another dimension to the color legend/dimension well. The chart is then split based on the values of this dimension. For example, you can analyze annual profit amounts by product type.

      This field is not used in this example.

      Note

      You can drag the same field into both the category axis and color legend wells to assign a unique color to each dimension value. The results vary depending on the scenario:

      • If there is only one field in both the category axis and the value axis, the number of boxes equals the number of unique values in the category axis field.image

      • If there are multiple measures in the value axis, the chart displays the first measure by default. You must open the field filter panel to switch to other measures.image

      If a box plot does not display all expected categories, check whether the data in the selected category-related field is complete, and switch to another field for verification. If the categories display correctly after you switch fields, further check the data in the original field.

  2. Click Update to refresh the chart.image

  3. To view a measure's data in the tooltip, add the measure to the tooltip/measure well.image

  4. To filter out data from certain regions, drag the Region field to the filter area. Then, click the image icon and select the data you want to display in the Set Filter window.image

  5. Auto Refresh

    When this option is enabled, the chart data refreshes automatically. For example, if you enable this option, set the duration to 5, and select Minutes as the unit, the chart data will refresh every 5 minutes.image

Configure chart styles

This section describes how to configure the styles for a box plot. For information about the common Title and Card settings, see Configure the chart title area.

image

Plot area

On the Style tab, configure the chart's visual style in the plot area section.

image

Setting

Option

Description

Chart display direction

Sets the orientation of the boxes. Options: Horizontal and Vertical.111

Visualization style

Sets the visual style of the boxes. You can select Wireframe, Fill, or Zonal Fill.

  • Wireframe: This style focuses on overall chart harmony and clearly displays all data elements. The box is enclosed by a border, and you can configure the color of the box and whiskers together.

  • Fill: This style emphasizes the median line, making it easy to compare the middle value of each data group. The box has no border, and you can set the box and whisker colors separately.

  • Zonal Fill: This style highlights the distribution of data at different levels, which helps you quickly understand the distribution characteristics of each data group. The box has no border, and you can set the box and whisker colors separately.

111

Box color

Sets the color scheme for the box corresponding to the field in the value axis/measure well. You can customize the box color.111

Box width

Sets the width of the box. If the specified width exceeds the maximum allowed range, this setting has no effect.111

Whiskers and caps

Whisker calculation method

Supports the following four methods:

  • General algorithm: The upper edge is the smaller of the dataset's maximum value and Q3+1.5*IQR. The lower edge is the larger of the dataset's minimum value and Q1-1.5*IQR. In this formula, IQR = Q3-Q1.

    This algorithm prevents outliers from affecting the overall chart appearance by comparing actual extreme values with statistical boundaries. It is suitable for scenarios where you need to reduce the impact of extreme values.

  • Maximum/Minimum: The upper edge is the maximum value in the dataset, and the lower edge is the minimum value.

    This algorithm uses the actual extreme values from the dataset as the edges, without considering statistical boundaries. It provides a direct view of the actual data range and is suitable for scenarios where you want to show the true range and the dataset has no significant outliers.

  • =1.5*IQR: The upper edge is Q3+1.5*IQR, and the lower edge is Q1-1.5*IQR.

    This algorithm uses statistical boundaries as the edges without considering the actual extreme values. It effectively shows the central tendency and skewness of the data and is ideal for scenarios where you need to emphasize statistical features and identify outliers.

  • <1.5*IQR: The upper and lower edges are the maximum and minimum values within the range between Q1-1.5*IQR and Q3+1.5*IQR.

    This algorithm considers both statistical boundaries and actual extreme values to ensure the edges do not exceed the actual data range. It accurately displays the data distribution while identifying outliers, making it suitable for scenarios that require both a true representation of the data distribution and outlier detection.

Show caps

Specifies whether to show the caps (the lines at the ends of the whiskers). If shown, you can also set the width of the cap lines.111

Median line

Specifies whether to show the median line and sets its line style.111

Data points

Content

Specifies whether to show Outliers and Normal Values in the chart.111

Note

You can configure the style of data points only when they are visible.

Data point size

Sets the size of the data points.

Outlier style

Sets the shape and color of outliers.

Normal Point Style

Sets the shape and color of normal data points.

Average value

Average value style

If the average value is displayed, sets the shape and color of its marker.

Circle size

Sets the size of the shape representing the average value.

Axes

On the Style tab, configure the axis styles in the Axes section. By default, the chart displays its axes.

image

Setting

Option

Description

X-axis

Show X-axis

Specifies whether to show the X-axis.image

Show title and unit

Specifies whether to show the Title and Unit on the X-axis. You can customize the title name and the unit of measurement, and configure the text style.

Show axis label

Specifies whether to show labels on the X-axis, and sets the text style of the labels.

Show tick marks

Specifies whether to show tick marks on the X-axis.

Show axis line

Specifies whether to show the X-axis line. If you show the axis line, you can customize its style, including line type, width, and color.

Show gridlines

Specifies whether to show gridlines for the X-axis. If you show gridlines, you can customize their style, including line type, width, and color.

Show 0-tick line

Specifies whether to show the gridline at the zero value on the X-axis. If you show the line, you can customize its style, including line type, width, and color.

left Y-axis

Show left Y-axis

Specifies whether to show the left Y-axis.image

Show title and unit

Specifies whether to show the axis Title and Unit. You can customize the title name and the unit of measurement, and configure the text style.

Show axis label

Specifies whether to show labels on the left Y-axis. If you show labels, you can set the Axis label display format and Text Style. The display format can be set to Auto or Custom.

  • The default mode is Auto. In this mode, the axis label inherits the data display format configuration of the measure field. If there are multiple measures, it uses the format of the first field.

  • In Custom mode, click the image icon to open the Data Display Format Settings dialog box and configure the data format as needed. For more information about the settings in the dialog box, see Data display format > Custom.

Show tick marks

Specifies whether to show tick marks on the left Y-axis.

Show axis line

Specifies whether to show the left Y-axis line. If you show the axis line, you can customize its style, including line type, width, and color.

Show gridlines

Specifies whether to show gridlines for the left Y-axis. If you show gridlines, you can customize their style, including line type, width, and color.

Axis value range and interval

Sets the minimum and maximum values for the left Y-axis, as well as the numerical interval between axis values.

  • You can set the Maximum/Minimum value for the Y-axis value range Automatically or Manually.111

    Note

    When you manually set the maximum/minimum value:

    • The maximum value cannot be less than 0.

    • The minimum value cannot be greater than 0.

  • You can set a custom interval by Step or by Number of Partitions.111

Legend

In the Legend section, click the image icon to enable the chart legend and configure its style. image

Setting

Description

Content

Specifies whether to show metrics for the background area in the legend.111

Position

Sets the position and alignment of the legend.

  • If you select Top or Bottom for the position, you can set the alignment to left, center, or right.

  • If you select Left or Right for the position, you can set the alignment to top, center, or bottom. You can also set the distance between the legend and the chart content.

Text

Sets the text style of the legend, including font color, size, weight, and whether it is italicized.

Legend for mobile

Legend settings for PC and mobile views are independent. This lets you set a separate legend layout for mobile devices, including its position and text style. You can switch to the mobile editing view by using the PC/mobile toggle button (image) at the top of the dashboard editor.image

Tooltip

In the Tooltip section, click the image icon to enable tooltips and configure their style.

image

Setting

Description

Content

Specifies whether to show the minimum, maximum, and average values in the tooltip.111

Background color

Sets the background color of the tooltip box.

Text

Sets the style of the text in the tooltip, including font color, size, weight, and whether it is italicized.

Tooltip for mobile

Tooltip settings for PC and mobile views are independent. You can set the font size separately for PC and mobile views, but other style settings are shared. You can switch to the mobile editing view by using the PC/mobile toggle button (image) at the top of the dashboard editor to edit the tooltip for mobile devices.image

Auxiliary display

In the auxiliary display section, configure the metric filter and view controls.

image

Setting

Description

Enable metric filter display

Specifies whether to enable the in-chart metric filter. If enabled, you can also set the default selected measure field.

View control

If the chart has too much data to fit within the current container size, you can click the image icon to enable view controls. This lets viewers dynamically adjust the visible range of the chart by scrolling, ensuring data integrity and readability while providing an interactive experience.

You can control the visible range of the chart axis using two types of view control: thumbnail axis and scroll bar.

  • If you select thumbnail axis, a simplified full-data trend chart (the thumbnail axis) appears at the bottom. Viewers can drag the selection area to quickly browse all data or focus on a specific range. The thumbnail axis uses an absolute coordinate system, meaning the selected interval directly corresponds to a fixed number of data items on the actual axis. This is suitable for comparative analysis or complex scenarios requiring direct navigation.imageBy default, the thumbnail axis appears only when the data exceeds the display width of the chart container. To always display it, select Always Show. After you select this option, the thumbnail axis remains visible even if the chart data does not fill the screen.

  • If you select scroll bar, a horizontal scroll bar appears at the bottom. Viewers can drag the slider left or right to move the viewing window. The scroll bar uses relative proportions, meaning the slider's length and position depend on the ratio of the visible window to the total data range. This is suitable for general browsing scenarios.imageYou can also set a minimum category width to limit the amount of data in the current window. This ensures clarity and prevents visual clutter from overlapping labels or dense data points. The minimum category width is 32px by default and ranges from 16 to 100px.

    When the actual category width required to display the entire chart is less than this value, the scroll bar appears. When the scroll bar is enabled, chart elements and data labels are constrained to the rectangular plot area. Any element (such as a data point or label) that extends beyond this area is clipped.

Note

If no view control is configured for a chart and its size is too small, the system automatically enables the view control, selects thumbnail axis, and displays it only when the amount of data exceeds the chart's display width.

Chart analysis

Setting

Option

Description

Data interaction

Drill-down

After you configure drill-down fields in the Fields panel, you can set the display style for the drill-down level rows here. For more information, see Drill-down.

Linkage

If the data you need to analyze is in different charts, you can use chart linkage to connect them for data analysis. For more information, see Linkage.

Jump

If the data you need to analyze is distributed across multiple dashboards, you can use jumps to link them for data analysis. The jump feature supports three methods: in-product jump, in-page component, and external link. For more information, see Jump.

Analysis and alerting

Reference line

Use a reference line to compare the current measure value against a set value. The reference value can be a fixed value or a calculated value, such as average, maximum, minimum, or median. For more information, see reference lines.

Annotation

-

When data in a chart is anomalous or requires special attention, you can use color highlights, icons, comments, or data points to create an annotation. This helps you identify issues and take appropriate action. For more information, see annotations.

Next steps

  • To let others view the dashboard, share it with them. For more information, see Share a dashboard.

  • To create complex, topic-based analyses with navigation menus, you can integrate your dashboards into a data portal. For more information, see data portal.