2021-01-30 01:43:29 +08:00
+++
title = "Graph time series as bars"
keywords = ["grafana", "time series panel", "documentation", "guide", "graph"]
2021-08-26 02:14:00 +08:00
aliases = ["/docs/grafana/latest/panels/visualizations/time-series/graph-time-series-as-bars/"]
2021-01-30 01:43:29 +08:00
weight = 200
+++
# Graph time series as bars
This section explains how to use Time series field options to visualize time series data as bars and illustrates what the options do.
2022-01-19 05:06:27 +08:00
For more information about the time series visualization, refer to [Time series ]({{< relref "_index.md" >}} ).
2021-01-30 01:43:29 +08:00
## Create the panel
2022-01-19 05:06:27 +08:00
1. [Add a panel ]({{< relref "../../panels/working-with-panels/add-panel.md" >}} ).
1. Select the **Time series** visualization.
1. In the Panel editor side pane, click **Graph styles** to expand it.
1. In Style, click **Bars** .
2021-01-30 01:43:29 +08:00
## Style the bars
Use the following field settings to refine your visualization.
Some field options will not affect the visualization until you click outside of the field option box you are editing or press Enter.
2021-02-03 16:02:33 +08:00
### Bar alignment
Set the position of the bar relative to a data point. In the examples below, **Show points** is set to **Always** to make it easier to see the difference this setting makes. The points do not change; the bars change in relationship to the points.
#### Before
2021-05-28 17:27:40 +08:00

2021-02-03 16:02:33 +08:00
The bar is drawn before the point. The point is placed on the trailing corner of the bar.
2021-05-28 17:27:40 +08:00

2021-02-03 16:02:33 +08:00
#### Center
2021-05-28 17:27:40 +08:00

2021-02-03 16:02:33 +08:00
The bar is drawn around the point. The point is placed in the center of the bar. This is the default.
2021-05-28 17:27:40 +08:00

2021-02-03 16:02:33 +08:00
#### After
2021-05-28 17:27:40 +08:00

2021-02-03 16:02:33 +08:00
The bar is drawn after the point. The point is placed on the leading corner of the bar.
2021-05-28 17:27:40 +08:00

2021-02-03 16:02:33 +08:00
2021-01-30 01:43:29 +08:00
### Line width
Set the thickness of the lines bar outlines, from 0 to 10 pixels. **Fill opacity** is set to 10 in the examples below.
Line thickness set to 1:
2021-05-28 17:27:40 +08:00

2021-01-30 01:43:29 +08:00
Line thickness set to 7:
2021-05-28 17:27:40 +08:00

2021-01-30 01:43:29 +08:00
### Fill opacity
Set the opacity of the bar fill, from 0 to 100 percent. In the examples below, the **Line width** is set to 1.
Fill opacity set to 20:
2021-05-28 17:27:40 +08:00

2021-01-30 01:43:29 +08:00
Fill opacity set to 95:
2021-05-28 17:27:40 +08:00

2021-01-30 01:43:29 +08:00
### Gradient mode
2022-01-19 05:06:27 +08:00
Set the mode of the gradient fill. Fill gradient is based on the line color. To change the color, use the standard color scheme field option. For more information, refer to [Apply color to series and fields ]({{< relref "../../panels/working-with-panels/apply-color-to-series.md" >}} ).
2021-01-30 01:43:29 +08:00
Gradient appearance is influenced by the **Fill opacity** setting. In the screenshots below, **Fill opacity** is set to 50.
#### None
No gradient fill. This is the default setting.
2021-05-28 17:27:40 +08:00

2021-01-30 01:43:29 +08:00
#### Opacity
Transparency of the gradient is calculated based on the values on the y-axis. Opacity of the fill is increasing with the values on the Y-axis.
2021-05-28 17:27:40 +08:00

2021-01-30 01:43:29 +08:00
#### Hue
Gradient color is generated based on the hue of the line color.
2021-05-28 17:27:40 +08:00

2021-01-30 01:43:29 +08:00
2021-08-06 21:52:36 +08:00
#### Scheme
2021-07-15 13:57:33 +08:00
2022-01-19 05:06:27 +08:00
In this mode the whole bar will use a color gradient defined by your Color scheme. For more information, refer to [Apply color to series and fields ]({{< relref "../../panels/working-with-panels/apply-color-to-series.md" >}} ). There is more information on this option in [Graph and color scheme ]({{< relref "./graph-color-scheme.md" >}} ).
2021-07-15 13:57:33 +08:00
{{< figure src = "/static/img/docs/time-series-panel/gradient_mode_scheme_bars.png" max-width = "1200px" caption = "Gradient color scheme mode" > }}
2021-01-30 01:43:29 +08:00
### Show points
Choose when the points should be shown on the graph
#### Auto
Grafana automatically decides whether or not to show the points depending on the density of the data. If the density is low, then points are shown.
#### Always
Show the points no matter how dense the data set is. This example uses a **Line width** of 1. If the line width is thicker than the point size, then the line obscures the points.
##### Point size
Set the size of the points, from 1 to 40 pixels in diameter.
Point size set to 6:
2021-05-28 17:27:40 +08:00

2021-01-30 01:43:29 +08:00
Point size set to 20:
2021-05-28 17:27:40 +08:00

2021-01-30 01:43:29 +08:00
#### Never
Never show the points.
2021-05-28 17:27:40 +08:00

2021-01-30 01:43:29 +08:00
2021-05-15 01:15:17 +08:00
{{< docs / shared " visualizations / stack-series-link . md " > }}
{{< docs / shared " visualizations / change-axis-link . md " > }}
2021-01-30 01:43:29 +08:00
## Bar graph examples
Below are some bar graph examples to give you ideas.
### Hue gradient
2021-05-28 17:27:40 +08:00
