Visualize relative data with bar charts
Classic dashboards have their own panels and methods of configuring them. For details about panels in classic dashboards, see Classic dashboard panels.
A bar chart visualizes numeric data returned by a query. The chart depicts a specified value, such as the last numeric value in a time series or the result’s sum, average, or minimum or maximum value, as a bar.
Using Chronosphere Observability Platform, you can visualize the results of multiple queries in a single bar chart panel to visually compare them. This can help you quickly compare relative values from related queries, such as resource usage of different services, a single service at different points in time, or cumulative failure and error counts.
To create a bar chart or learn more about the configuration options common to all panels, see Panels.
Use a bar chart’s tooltip
When you hold the pointer over a bar in a bar chart, Observability Platform displays a tooltip that shows the bar’s full label and value.
Bar chart queries
Bar charts use one or more queries to retrieve data to visualize. Bar charts use the following query Options to refine the displayed information, depending on your Datasource:
-
Series naming: Select a method to filter for metrics:
- Labels require a Naming pattern. Use
{{ label_name }}
to include a label value. For example,{{ env }}
will be replaced with values like staging-1, prod-1. - Regex: Use a regular expression in the Regex text field to match a time series. You can also use a Naming pattern to rename series using capture groups.
- Labels require a Naming pattern. Use
- Type: The PromQL query type: Instant, or Range.
Configure a bar chart
You can configure a bar chart by modifying its Settings.
Any changes you make in the panel’s Settings tab are reflect immediately in the Preview pane, but take effect only when you click Apply in the Edit panel interface and then Save the dashboard.
Observability Platform doesn’t fully support directly editing a panel’s JSON representation. Instead, configure panels directly in the user interface. Use the JSON representation only for managing your configuration as code with tools such as Chronoctl and Terraform.
Miscellaneous settings
The Misc tab contains these settings:
- Mode: Determines whether the panel depicts a bar’s numeric value as its literal Value or as a Percentage of the sum of all bars in the chart.
- Sort: Determines how the bar chart sorts the rendered bars.
- Default sorts the bars in their original data order.
- Ascending sorts the bars from the lowest value at the top, to the highest value at the bottom. Descending sorts in the opposite direction.
- Limit: The maximum number of returned values.
Modify units and formatting
The Unit and formatting section changes the display of units on the chart.
- Unit: Defines the unit used to render the Y axis. This has the most significant
effect when you enable Abbreviate. Defaults to
Decimal
.-
Decimal: Base 10 values. Observability Platform renders a value of
1000000
as1M
. -
Bytes: As decimal multiple-byte units. Observability Platform renders a value of
1000000
as1MB
. -
Time: Determines the unit of time that Observability Platform uses to interpret a numeric value.
-
Percent: Interprets the value as a percentile, representing 0% to 100% on a range of either 0.0 to 1.0 (Percent (0.0-1.0)) or 0 and 100 (Percent (0-100)).
For example, Observability Platform renders a value of
1.0
in Percent (0.0-1.0) as100%
, and in Percent (0-100) as1%
.
-
- Decimals: Defines how many decimal places Observability Platform renders for
- values.
Default renders decimal places only if necessary and rounds to the nearest
value. Numeric values from
0
to4
render the corresponding number of decimal places. - Abbreviate: Toggles whether to abbreviate units on the Y axis. For example, if
enabled, Observability Platform renders a value of
100000000
as100M
. You can toggle this setting only if you set the Unit toDecimal
orBytes
.Time
units are always abbreviated andPercent
values don’t require it. Defaults totrue
.
Modify a bar chart’s thresholds
The Thresholds section in a chart’s Settings tab defines values where Observability Platform renders threshold lines over the chart. You can define threshold values as either absolute numeric values or percentiles. Observability Platform renders threshold lines as dashed lines.
The threshold’s Mode defines whether all thresholds use Absolute numeric values or Percent values. Percent values are relative to the Y axis’ minimum and maximum. Defaults to Absolute.
To create a new threshold:
- Click the plus sign (+) in the Thresholds section header.
- In the field that appears, enter a value where you want Observability Platform to render the threshold line.
- Optional: Click the color indicator, depicted as a colored circle, to open a selector where you can choose a color for the threshold line.
- Optional: Click the caret (>) to expand the threshold definition, and enter text in the Label field to display on the chart if the threshold is met. This text displays when you hold the pointer over the area of the chart exceeding the threshold.
- In the Edit panel dialog, click Apply to save your changes.
- After you’ve finished editing the panel, click Save on the dashboard to save your changes.
To delete a threshold line, click the caret (>) to expand the threshold definition, and then click the Delete icon on its corresponding row of the Thresholds section.
Modify a bar chart’s colors
The Advanced tab in a bar chart’s Edit panel interface contains an Override section where you can add, remove, and configure colors. You can apply color overrides to a specific series or all series that match a regular expression.