You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: explore-analyze/visualize/metric-charts.md
+60-76Lines changed: 60 additions & 76 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,17 +8,17 @@ description: Instructions and best practices for building metric charts with Kib
8
8
9
9
# Build metric charts with {{kib}}
10
10
11
-
Metric charts make important single values stand out on a dashboard. They're perfect for highlighting KPIs like total sales, active users, or error rates. They can show a plain number, a percentage, or a calculation like a count, sum, or average.
11
+
Metric charts make important single values stand out on a dashboard. They're perfect for highlighting KPIs like total sales, active users, or error rates.
12
12
13
-
Metric charts are the best visualization when you need to show a single, important value and make it visible.
13
+
They work with any numeric data: plain numbers, percentages, or calculations like a count, sum, or average. You can get this numeric data from numeric fields stored in your {{es}} documents, or from aggregation functions and formulas that you can apply to any type of field.
14
14
15
15
The best way to create metric charts in {{kib}} is with **Lens**.
16
16
17
17

18
18
19
-
## Requirements
19
+
## When to use metric charts
20
20
21
-
Metric charts work with any numeric data. That data can directly come from numeric fields in your data, or be the result of aggregations or formulas.
21
+
Metric charts are the best visualization when you need to show a single, important value and make it visible.
22
22
23
23
## Build a metric chart
24
24
@@ -33,7 +33,7 @@ To build a metric chart:
33
33
::::
34
34
35
35
::::{step} Set the visualization to Metric
36
-
New visualizations suggest to create**Bar** charts by default.
36
+
New visualizations default to creating**Bar** charts.
37
37
38
38
Using the dropdown indicating **Bar**, select **Metric**.
39
39
::::
@@ -49,7 +49,7 @@ Using the dropdown indicating **Bar**, select **Metric**.
49
49
Refer to [](#settings) to find all data configuration options for your metric chart.
50
50
::::
51
51
52
-
::::{step} Customize the appearance of the chart
52
+
::::{step} Customize the chart with best practices
53
53
Tweak the appearance of the chart to your needs. Consider the following best practices:
54
54
55
55
**Use color wisely**
@@ -70,67 +70,6 @@ Save your visualization by selecting **Save and return** if you're adding it fro
70
70
71
71
:::::
72
72
73
-
## Examples
74
-
75
-
Here are common patterns you can adapt for your own data.
76
-
77
-
**Executive dashboard KPI**
78
-
: Display total revenue as a prominent number on an executive dashboard:
79
-
80
-
* **Primary metric**: `sum(sales.revenue)`
81
-
* **Value format**: Currency with 1 decimal place
82
-
* **Title**: "Total Revenue"
83
-
* **Subtitle**: "Current Quarter"
84
-
* **Color by value**: Green when above target, red when below
85
-
86
-
**Website traffic with trend**
87
-
: Monitor current traffic and show whether it's increasing or decreasing compared to the previous period:
* **Color mapping**: Assign brand colors to each service for consistency
133
-
134
73
## Advanced configurations
135
74
136
75
### Show trends in Metric charts [metric-trends]
@@ -177,7 +116,7 @@ To add trend indicators to your metric visualization:
177
116
* The secondary metric label changes to **Difference**. You can change this by editing the **Prefix** option of the metric.
178
117
* If you chose a **Display** option that shows a value, the secondary metric value is automatically updated to show the difference compared to the primary metric.
179
118
180
-
7. Apply your changes.
119
+
8. Apply your changes.
181
120
182
121
The metric visualization now shows the secondary metric as a comparison with a trend indicator.
183
122
@@ -195,7 +134,7 @@ Customize your metric chart to display exactly the information you need, formatt
195
134
196
135
**Appearance**
197
136
: Define the formatting of the primary metric, including:
198
-
- **Name**: By default, the chart uses the function or formula as title. It is a best practice to customize this with a readable title.
137
+
- **Name**: By default, the chart uses the function or formula as title. It's a best practice to customize this with a readable title.
199
138
- **Value format**: Choose to display the metric as number, percent, bytes, bits, duration, or with a custom format that you can define.
200
139
- **Color by value**: Apply colors to the chart. Choose between **Static** for a unique color and **Dynamic** for using different colors based on the metric's value. By default, the color applies to the chart's background.
201
140
- **Static**: Pick a color and its opacity. That color always remains the same and is independent from the metric's value.
@@ -218,7 +157,7 @@ Customize your metric chart to display exactly the information you need, formatt
218
157
219
158
**Appearance**
220
159
: Define the formatting of the secondary metric, including:
221
-
- **Name**: By default, the chart uses the function or formula as title. It is a best practice to customize this with a readable title.
160
+
- **Name**: By default, the chart uses the function or formula as title. It's a best practice to customize this with a readable title.
222
161
- **Value format**: Choose to display the metric as number, percent, bytes, bits, duration, or with a custom format that you can define.
223
162
- **Label**: Define the label displayed next to the secondary metric. By default, the **Name** shows. You can instead show a **Custom** value or hide it by selecting **None**.
224
163
- **Label position**: Choose to show the label **Before** or **After** the metric.
@@ -233,25 +172,25 @@ Customize your metric chart to display exactly the information you need, formatt
233
172
:::
234
173
235
174
**Appearance**
236
-
: Define the formatting of the secondary metric, including:
237
-
- **Name**: By default, the chart uses the function or formula as title. It is a best practice to customize this with a readable title.
175
+
: Define the formatting of the maximum value, including:
176
+
- **Name**: It's a best practice to customize this with a readable title.
238
177
239
178
### Breakdown settings [breakdown-options]
240
179
241
180
**Data**
242
181
: Split your metric into multiple tiles based on a categorical field. Each unique value creates its own tile, allowing you to compare metrics across regions, products, time periods, or any other dimensions. You can optionally specify the following options:
243
182
244
183
- **Number of values**: The number of tiles to show. If more values are available for the selected breakdown field, an additional tile named **Other** shows if the **Group remaining values as "Other"** advanced option is on.
245
-
- **Rank by**: The dimension top values are ranked by.
184
+
- **Rank by**: The dimension by which top values are ranked.
246
185
- **Rank direction**: The direction to use for the ranking.
247
186
- **Collapse by**: Aggregate values of the various tiles into a single number. Possible aggregation options are `None` (default), `Sum`, `Average`, `Min`, and `Max`.
0 commit comments