Teach you how to play with combination charts in one minute

336590b690405add69f8d9ab47aeebbd.jpeg

In daily work, sometimes a single chart type cannot satisfy multi-dimensional data display. At this time, it is necessary to consider using a combination chart.

What is a combination chart?

It is to combine two or more chart types to draw on one chart.

Below we will teach you how to make a combination chart through the classic column-line combination chart.

1. Classic column-line combination chart

The column chart below shows the salary of each employee in the company, and the line chart shows the average salary.

acb4312d012ec69b7a6c8c53ca6f1b82.gif

Using the combination of column chart + line chart, you can not only see the salary of each employee, but also see the gap between the salary of each employee and the average salary of the company.

How is such a picture made?

This requires the use of Excel's auxiliary columns to draw.

Add a column "company average salary" in Excel as an auxiliary column for drawing the average salary later, so the values ​​in this column are all average values.

a8383f2d9cf04ec5f770b0101e674700.jpeg

Using data from all columns (including auxiliary columns) to draw a histogram results in the graph below. You will find that the auxiliary column has also become part of the histogram.

060e99053cd3260f7f4f57cac871580b.jpeg

We need to turn this auxiliary column into the horizontal line we want. Select the "Auxiliary Column" column, click the right mouse button, and select "Change Series Chart Type".

d5d5cade1265b70b7b5cfbe0062718f9.jpeg

In the [Change Chart Type] pane that pops up, set the chart type of the auxiliary column (that is, "Company Average Salary") to "Line Chart".

4f014bf18832387ffdb7dbfcfb79740f.jpeg

Finally, we get the combined graph we want.

094388fae65b706953bd0a5908c58804.jpeg

2. Change the polyline marker

It is also a column-line combination chart, but by changing the markers of the line chart, we can evolve a new combination chart.

First, select the data to be charted, [Insert] in the chart, and select the chart type as "combined chart". The system will default to column chart + line chart type.

25db3af1154966c3cebc2ca1c585dc80.jpeg

Select the polyline on the graph, right-click the mouse, and click [Set Data System Format] in the drop-down menu. In the [Format Data Series] window that pops up, set the "Line" to "No Line".

63e649d45d06babb158c0a9732a63940.jpeg

32959deb3543e87ddd915ded4b3caf11.jpeg

In the "Marker" option, set the marker to "built-in", select the appropriate built-in marker style, here I choose a horizontal line marker, and then adjust its size to make it equivalent to the width of the column chart.

cd90c9a523681600090ad1df4500f387.jpeg

f332d22e4364cb8c59cdef6061379006.jpeg

Finally, the result is as follows:

cab570b97b25f2956fbb0a303cbf0b59.jpeg

3. Separating the data into multiple series

Taking the average value as the dividing line, now I want to mark the data above the average value and below the average value with different colors, as shown in the figure below:

85a81c4e788e23f200d0ca9918f27404.gif

As can be seen from the figure, no matter how the original data changes, those above the average are always displayed in blue, and those below the average are always displayed in gray. How is this made?

At this time, it is necessary to separate the data into multiple series and format the data of each series separately.

First, use the if function to separate the raw data in column B into columns E that are above average and columns that are below average.

576ceab7a55144d2e6f8284dce5961fa.jpeg

The formula in column E is: =IF(B2>D2,B2,NA()), that is to judge whether the value of B2 is greater than the average value, if so, return B2 itself, otherwise, return NA().

The formula of column F is: =IF(B2<D2,B2,NA()), judge whether the value of B2 is smaller than the average value, if yes, return B2 itself, otherwise, return NA().

Small expansion of knowledge:

Some people will definitely wonder why NA() is returned here. Knock on the blackboard! In the chart making process, it is necessary to distinguish the different display forms of empty cells, zero, and #NA in the line chart .

When the content of the cell is text, space, or zero, the chart will display data points as 0, and a breakpoint will be formed in the line chart; when the content of the cell is "#N/A" or "=NA()", In a line chart, it will appear as a straight line connecting the data points.

In this case demonstration, the data in column E and column F are all made as column charts instead of line charts, so no matter whether column E or column F returns NA() or 0, the result is actually the same. It's just that I'm used to using NA().

After separating the original data into two series, use the data in columns E and F as a stacked column chart to realize the automatic conditional formatting of the chart, and those above the average value and those below the average value are marked by different colors.

141dfb6bf4a1af36fe9af86b674f8554.jpeg

Then copy the average value column D data to the chart, and the system will default to a column chart. Click the right mouse button and select "Change Series Chart Type".

ec2cb4fad2a767d733e239d8fc10938e.jpeg

In the [Change Chart Type] pane that pops up, in the combination chart, set the table type of the average value to a line chart.

65412337c85b40f415d52b48e6570525.jpeg

Finally, we achieved the desired effect:

313e4092cafc089e66b7db9d560a4d39.jpeg

4. Summary

The operation of drawing a combination chart is not complicated. By default, there are many commonly used combination charts in Excel’s insert chart function, which can be used directly on weekdays.

If there is no combined chart you want in Excel’s insert chart function, you can refer to the case in this article, first draw all the data into the same chart type, then select the data series you want to modify, and modify it to another chart type. up.

c7f6f82cceb824d4e2692c2424564fce.jpeg

 ⬇️Click "Read the original text"

 Sign up for free Data analysis training camp

Guess you like

Origin blog.csdn.net/zhongyangzhong/article/details/130417918