¿Cómo dar formato al gráfico de bars en Power BI con un ejemplo? Dar formato al gráfico de barras de Power BI incluye cambiar los colores de la barra horizontal, el texto del título, la posición del título, las etiquetas de datos, los detalles del eje y los colores de fondo, etc.
To demonstrate these Power BI bar chart formatting options, we'll use the bar chart we created earlier. See the Power BI Bar Chart article to understand the steps required to create a Power BI bar chart.
How to format the bar chart in Power BI
Click on the Format to see the list of formatting options available for this bar chart.


Format the bar chart in the general section of Power BI
Use this general section to change the X, Y position, width and height of a bar chart

Format the Y-axis of a Power BI bar chart
The following is the list of options that are available to format the vertical axis or the Y axis.

You can see in the screenshot below, we changed the Y-axis Labels Color to Green, Text Size to 12, Font Style to Cambria. You can use the Minimum Category Width, Maximum Size, and Inner Padding options to change the width of the horizontal bar.

By default, the Y-axis title is disabled, but you can enable it by toggling Title in the Y-axis section to In. Let me change the title color to brick red, the title text size to 25, and the font style to Georgia.

Format the X-axis of a bar chart in Power BI
Below is the list of options that are available to format the horizontal axis or the X axis

As you can see in the following screenshot, we changed the color to green, the font style to Cambria, the text size to 13, the display units to thousands (the default is automatic).

By default, the X-axis title is disabled, but you can enable it by changing Title to In. Let me change the title color to brick red, the font style to Georgia, and the font size to 25.
When toggling the bar chart Grid lines option from On to Off, you can disable the grid lines.
- Colour: You can change the color of the grid.
- Stroke width: Use this to change the width of the grid. Here, we change the width from 1 to 2 default strokes.
- Line Style: Choose the line style as Solid, Dotted, and Dashed.

In the following screenshot, you can see the changes we made in X-Axis.

Format data colors in a bar chart in Power BI
If you add any valid column to the Color saturation field, then you can use this Divergent option to add colors to the bar chart. By default it is disabled, but you can enable those divergent options by changing from disabled to enabled

If you have not added any archives in the Color saturation section, then Divergent option under the Data colors section replaced with Default color option as below

Let me add the Minimum, Center and Maximum colors. Remember, you also have the option of adding the Minimum, Center, and Maximum values.

Enable data labels for Power BI bar chart
The bar chart data labels display information about each individual horizontal bar. In this case, it shows the sales amount for each bar. To enable or format Power BI bar chart data labels, toggle Data labels option a In.
Let me change the color to green, the display units from automatic to thousands, the font family to DIN, the text size to 10, and the background color to black with 90% transparency

Format the bar chart in the Power BI plot area
You can add images as the background of a bar chart using this section of the plot area. For demonstration purposes, we added an image as the background of the plot area.

Format the bar chart in Power BI title
By toggling the Title of In to Off, you can turn off the Bar Chart title.
As you can see in the screenshot below, we changed the title text to Sales Amount and Order Quantity by State Province Name. We also changed the font color to green, the font family to Georgia, the font size to 23, and the title to center alignment. If you want, you can also add the background color to the title.

Format the background color and border of a bar chart in Power BI
You can add the background color to a bar chart by toggling Background option a In. And you can add borders to a bar chart by toggling the Border option of Off to In.
