Home and Learn: Power BI 2023


Formatting Charts in Power BI

In the previous lesson, we created a line chart in Power BI. But it looks a bit of a mess. We have this, so far

Three lines on a Power BI line chart.

In this lesson, we're going to spruce the chart up. It will look like this, when we're done:

Line chart in Power BI with some formatting applied.

Let's get started.

 

Changing Line Colors in Power BI

By default, Power BI has used a light blue for the Red Widget, dark blue for the Blue Widget, and orange for the Green Widget. Let's change these default colors. We need to bring up the Format panel to do so.

Click the paintbrush icon in top right of the chart to see a new flyout:

The Add to your visual flyout in Power BI 2023.

Power BI has checked the boxes for Title, X-axis, Y-axis, Secondary y-axis, and Legend. To see what these are, uncheck them. They will disappear from the chart. Check them again to bring them back. Also, check the ones that are unchecked, in the image above, just to see what they do. The Markers one is helpful.

But click the More options button to bring up the Format panel on the right of Power BI. There are quite a lot of options to explore:

The Format options for a chart in Power BI 2023.

The option we want first is Lines. Expand the Lines > Colors item to see the following:

the Format > Line > color options

Now select the correct colors from the dropdown Colors:

Selecting new colors for the lines on the chart.

Your chart will look like this: (We added the markers, as explained above.)

The line chart in Power BI with the line colors changed.

 

Change a Chart Title in Power BI 2023

The Title at the top needs changing as it's far too long.

Expand the Title section of the Format panel to see the following:

The Title section of the Format panel in Power BI 2023.

If you don't want a title at the top, simply toggle the On/Off button.

Type some new Text for your Title. You can change the Font, Text color, Background color, and alignment:

Title options changed for a line chart in Power BI 2023.

We've went for the Text Widget Sales in 17 point font. We've made it bold, changed the color to blue, and have the Horizontal alignment as centered. The result is this on the chart:

Power BI line chart with a title changed.

Now let's format the Legend (you do remember which one the legend is, right?).

 

Format Chart Legend in Power BI 2023

Rather annoyingly, you can't change the Legend text from the Format panel. Even though there is a section called Legend, with Title and Text items under it. The text we're trying to change is this:

The Line Chart Legend

We want to change the text to the right of the colored circles. How do you change the Legend text, then, if you can't do so from the Format panel? From the Build a visual flyout, of course! How did you not guess that?

With your chart selected, click the icon to toggle the Build a visual flyout. Right-click the Sum of Red Widgets under the Y-axis heading:

Arrow indicating where to click when chaging a legend title.

From the menu that appears, select Rename for this visual (second item from the top, in the image below):

Context menu showing the item Rename for this Visual in Power BI.

Type some new text for the legend:

Typing new text for a Power BI chart legend

Rename the other two in the same way:

All legend text changed.

Your chart will then look like this:

New legends on a Power BI line chart.

You can center your Legends. Go back to the Format panel and the Legend section. Expand the Options item and notice that there is a Position dropdown:

Legend Options

The default is Top Left. Change this to Top Center.

If you want, you can change the marker style, as well. In the image below, we've gone for a Line instead of Mark (circle default):

Line Markers of a chart changed

 

Y-Axis Title

The vertical text for the Y-axis is far too long. To change it, expand the Y-axis item in the Format panel. Under Y-axis, there is a section for the Title. It currently says Auto:

Y-Axis title options in Power BI.

Type some new text here:

A Y-Axis title changed.

The Y-axis title should change on your chart:

A Line Chart with its Y-Axis title changed.

Our vertical Y-axis title on the left now says Sales.

 

Power BI Chart Backgrounds

If you want to change the background color of a Power BI chart from the default white, expand the Size and Style section at the top, then the Background item: (If you want to use a picture as the background, expand the Plot area background section at the bottom of the Format panel.)

Size and Style > Background options in Power BI 2023.

Select any color you like for the background, and play around with the Transparency slider.

Notice that there is a Visual Border section and a Shadow section. Play around with these to see what you can come up with.

If you want to change the liner markers from the default round ones, expand the Markers > Shape section:

Line Chart marker options

You can change the size of the markers and the shape of them via the Type dropdown. In the chart below, we've changed the markers to a larger diamond. We've also added a chart background color with rounded corners:

The finished Power BI line chart.

A good chart conveys its information quickly and easily. And the best charts aren't cluttered with unnecessary details.

OK, we'll move on and look at the other chart types you can have in Power BI.

<--Back to the Power BI Contents Page

 


Email us: enquiry at homeandlearn.co.uk