mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
docs: update histogram visualization (#85125)
* docs: update histogram visualization docs * docs: updates to histogram visualization * Apply suggestions from code review Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * Fixed typo I introduced * docs: add youtube video --------- Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
This commit is contained in:
parent
30c9307539
commit
4a3140a0aa
@ -21,17 +21,67 @@ weight: 100
|
||||
|
||||
# Histogram
|
||||
|
||||
Histograms calculate the distribution of values and present them as a bar chart. The Y-axis and the height of each bar represent the count of values that fall into each bracket while the X-axis represents the value range.
|
||||
Histograms calculate the distribution of values and present them as a bar chart. Each bar represents a bucket; the y-axis and the height of each bar represent the count of values that fall into each bucket, and the x-axis represents the value range.
|
||||
|
||||
{{< figure src="/static/img/docs/histogram-panel/histogram-example-v8-0.png" max-width="625px" caption="Bar chart example" >}}
|
||||
For example, if you want to understand the distribution of people's heights, you can use a histogram visualization to identify patterns or insights in the data distribution:
|
||||
|
||||
{{< figure src="/static/img/docs/histogram-panel/histogram-example-v8-0.png" max-width="625px" alt="A histogram visualization showing the distribution of people's heights" >}}
|
||||
|
||||
You can use a histogram visualization if you need to:
|
||||
|
||||
- Visualize and analyze data distributions over a specific time range to see how frequently certain values occur.
|
||||
- Identify any outliers in your data distribution.
|
||||
- Provide statistical analysis to help with decision-making
|
||||
|
||||
## Configure a histogram visualization
|
||||
|
||||
Once you’ve created a [dashboard](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/create-dashboard/), the following video shows you how to configure a histogram visualization:
|
||||
|
||||
{{< youtube id="QfJ480j9-KM" >}}
|
||||
|
||||
## Supported data formats
|
||||
|
||||
Histograms support time series and any table results with one or more numerical fields.
|
||||
|
||||
## Display options
|
||||
### Examples
|
||||
|
||||
Use the following options to refine your visualization.
|
||||
The following tables are examples of the type of data you need for a histogram visualization and how it should be formatted.
|
||||
|
||||
#### Time-series table
|
||||
|
||||
| Time | Walking (km) |
|
||||
| ------------------- | ------------ |
|
||||
| 2024-03-25 21:13:09 | 37.2 |
|
||||
| 2024-03-25 21:13:10 | 37.1 |
|
||||
| 2024-03-25 21:13:10 | 37.0 |
|
||||
| 2024-03-25 21:13:11 | 37.2 |
|
||||
| 2024-03-25 21:13:11 | 36.9 |
|
||||
| 2024-03-25 21:13:12 | 36.7 |
|
||||
| 2024-03-25 21:13:13 | 36.3 |
|
||||
|
||||
The data is converted as follows:
|
||||
|
||||
{{< figure src="/static/img/docs/histogram-panel/histogram-example-time-series.png" max-width="1025px" alt="A histogram visualization showing the walk distribution from random people over time." >}}
|
||||
|
||||
#### Basic numerical table
|
||||
|
||||
| Gender | Height (kg) | Weight (lbs) |
|
||||
| ------ | ----------- | ------------ |
|
||||
| Male | 73.8 | 242 |
|
||||
| Male | 68.8 | 162 |
|
||||
| Male | 74.1 | 213 |
|
||||
| Male | 71.7 | 220 |
|
||||
| Male | 69.9 | 206 |
|
||||
| Male | 67.3 | 152 |
|
||||
| Male | 68.8 | 184 |
|
||||
|
||||
The data is converted as follows:
|
||||
|
||||
{{< figure src="/static/img/docs/histogram-panel/histogram-example-height-weight.png" max-width="1025px" alt="A histogram visualization showing the male height and weight distribution" >}}
|
||||
|
||||
## Histogram options
|
||||
|
||||
Use the following options to refine your histogram visualization.
|
||||
|
||||
### Bucket size
|
||||
|
||||
|
@ -23,7 +23,7 @@ A state timeline visualization displays data in a way that shows state changes o
|
||||
|
||||
For example, if you're monitoring the CPU usage of a server, you can use a state timeline to visualize the different states, such as “LOW,” “NORMAL,” “HIGH,” or “CRITICAL,” over time. Each state is represented by a different color and the lengths represent the duration of time that the server remained in that state:
|
||||
|
||||
{{< figure src="/static/img/docs/state-timeline-panel/state-timeline-panel.png" max-width="1025px" alt="A state timeline panel showing CPU usage" >}}
|
||||
{{< figure src="/static/img/docs/state-timeline-panel/state-timeline-panel.png" max-width="1025px" alt="A state timeline visualization showing CPU usage" >}}
|
||||
|
||||
The state timeline visualization is useful when you need to monitor and analyze changes in states or statuses of various entities over time. You can use one when you need to:
|
||||
|
||||
@ -37,7 +37,7 @@ The state timeline visualization is useful when you need to monitor and analyze
|
||||
|
||||
## Supported data formats
|
||||
|
||||
The state timeline panel works best if you have data capturing the various states of entities over time, formatted as a table. The data must include:
|
||||
The state timeline visualization works best if you have data capturing the various states of entities over time, formatted as a table. The data must include:
|
||||
|
||||
- **Timestamps** - Indicate when each state change occurred. This could also be the start time for the state change. You can also add an optional timestamp to indicate the end time for the state change.
|
||||
- **Entity name/identifier** - Represents the name of the entity you're trying to monitor.
|
||||
@ -65,7 +65,7 @@ The following tables are examples of the type of data you need for a state timel
|
||||
|
||||
The data is converted as follows, with the [null and empty values visualized as gaps](https://grafana.com/docs/grafana/latest/panels-visualizations/visualizations/state-timeline/#connect-null-values) in the state timeline:
|
||||
|
||||
{{< figure src="/static/img/docs/state-timeline-panel/state-timeline-with-null-values.png" max-width="1025px" alt="A state timeline panel with null values showing the status of two servers" >}}
|
||||
{{< figure src="/static/img/docs/state-timeline-panel/state-timeline-with-null-values.png" max-width="1025px" alt="A state timeline visualization with null values showing the status of two servers" >}}
|
||||
|
||||
#### Two time columns without null values
|
||||
|
||||
@ -80,7 +80,7 @@ The data is converted as follows, with the [null and empty values visualized as
|
||||
|
||||
The data is converted as follows:
|
||||
|
||||
{{< figure src="/static/img/docs/state-timeline-panel/state-timeline-with-two-timestamps.png" max-width="1025px" alt="A state timeline panel with two time columns showing the status of two servers" >}}
|
||||
{{< figure src="/static/img/docs/state-timeline-panel/state-timeline-with-two-timestamps.png" max-width="1025px" alt="A state timeline visualization with two time columns showing the status of two servers" >}}
|
||||
|
||||
If your query results aren't in a table format like the preceding examples, especially for time-series data, you can apply specific [transformations](https://stackoverflow.com/questions/68887416/grafana-state-timeline-panel-with-values-states-supplied-by-label) to achieve this.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user