Charts in excel
Charts in excel
A simple chart in Excel can say more than a sheet full of numbers. As
you'll see, creating charts is very easy.
Create a Chart
To create a line chart, execute the following steps.
2. On the Insert tab, in the Charts group, click the Line symbol.
2. On the Chart Design tab, in the Type group, click Change Chart Type.
3. On the left side, click Column.
4. Click OK.
Result:
Switch Row/Column
If you want to display the animals (instead of the months) on the
horizontal axis, execute the following steps.
2. On the Chart Design tab, in the Data group, click Switch Row/Column.
Result:
Legend Position
To move the legend to the right side of the chart, execute the following
steps.
2. Click the + button on the right side of the chart, click the arrow next to
Legend and click Right.
Result:
Data Labels
You can use data labels to focus your readers' attention on a single data
series or data point.
3. Hold down CTRL and use your arrow keys to select the population of
Dolphins in June (tiny green bar).
4. Click the + button on the right side of the chart and click the check box
next to Data Labels.
Result:
Column Chart
Column charts are used to compare values across categories by using
vertical bars.
1. Select the range A1:A7, hold down CTRL, and select the range C1:D7.
2. On the Insert tab, in the Charts group, click the Column symbol.
Result:
Line Chart
Line charts are used to display trends over time. Use a line chart if you
have text labels, dates or a few numeric labels on the horizontal axis. Use
a scatter plot (XY chart) to show scientific XY data.
2. On the Insert tab, in the Charts group, click the Line symbol.
Note: only if you have numeric labels, empty cell A1 before you create the
line chart. By doing this, Excel does not recognize the numbers in column
A as a data series and automatically places these numbers on the
horizontal (category) axis. After creating the chart, you can enter the text
Year into cell A1 if you like.
5. On the Chart Design tab, in the Data group, click Select Data.
Result:
To change the color of the line and the markers, execute the following
steps.
8. Click the paint bucket icon and change the line color.
9. Click Marker and change the fill color and border color of the markers.
Result:
To add a trendline, execute the following steps.
11. Click the + button on the right side of the chart, click the arrow next to
Trendline and then click More Options.
13. Specify the number of periods to include in the forecast. Type 2 in the
Forward box.
Result:
To change the axis type to Date axis, execute the following steps.
14. Right click the horizontal axis, and then click Format Axis.
Pie Chart
Pie charts are used to display the contribution of each value (slice) to a
total (pie). Pie charts always use one data series.
To create a pie chart of the 2017 data series, execute the following
steps.
3. Click Pie.
Result:
4. Click on the pie to select the whole pie. Click on a slice to drag it away
from the center.
Result:
Note: only if you have numeric labels, empty cell A1 before you create the
pie chart. By doing this, Excel does not recognize the numbers in column
A as a data series and automatically creates the correct chart. After
creating the chart, you can enter the text Year into cell A1 if you like.
5. Select the range A1:D1, hold down CTRL and select the range A3:D3.
6. Create the pie chart (repeat steps 2-3).
9. Click the + button on the right side of the chart and click the check box
next to Data Labels.
10. Click the paintbrush icon on the right side of the chart and change the
color scheme of the pie chart.
Result:
11. Right click the pie chart and click Format Data Labels.
12. Check Category Name, uncheck Value, check Percentage and click
Center.
Result:
Note: right click the data labels and click Font to change the font size and
font color of the data labels.
Bar Chart
A bar chart is the horizontal version of a column chart. Use a bar chart if
you have large text labels.
2. On the Insert tab, in the Charts group, click the Column symbol.
Area Chart
An area chart is a line chart with the areas below the lines filled with
colors. Use a stacked area chart to display the contribution of each value
to a total over time.
3. Click Area.
4. Change the chart's subtype to Stacked Area (the one next to Area).
Result:
Note: only if you have numeric labels, empty cell A1 before you create the
area chart. By doing this, Excel does not recognize the numbers in column
A as a data series and automatically places these numbers on the
horizontal (category) axis. After creating the chart, you can enter the text
Year into cell A1 if you like.
Scatter Plot
Only Markers | Straight Lines
Use a scatter plot (XY chart) to show scientific XY data. Scatter plots are
often used to find out if there's a relationship between variable X and Y.
Only Markers
To find out if there is a relationship between X (a person's salary) and Y
(his/her car price), execute the following steps.
3. Click Scatter.
Result:
Note: we added a trendline to clearly see the relationship between these
two variables.
Straight Lines
To create a scatter plot with straight lines, execute the following steps.
Result:
Note: we added a horizontal and vertical axis title. The horizontal axis of a
scatter plot is a value axis, so you have more axis scaling options (the
same as a vertical axis which always is a value axis).
Data Series
Select Data Source | Switch Row/Column | Add, Edit, Remove and Move
2. On the Insert tab, in the Charts group, click the Column symbol.
Result:
Select Data Source
To launch the Select Data Source dialog box, execute the following steps.
1. Select the chart. Right click, and then click Select Data.
Switch Row/Column
If you click Switch Row/Column, you'll have 6 data series (Jan, Feb, Mar,
Apr, May and Jun) and three horizontal axis labels (Bears, Dolphins and
Whales).
Result:
Add, Edit, Remove and Move
You can use the Select Data Source dialog box to add, edit, remove and
move data series, but there's a quicker way.
Result:
Axes
Axis Type | Axis Titles | Axis Scale
Most chart types have two axes: a horizontal axis (or x-axis) and
a vertical axis (or y-axis). This example teaches you how to change the
axis type, add axis titles and how to change the scale of the vertical axis.
Result:
Axis Type
Excel also shows the dates between 8/24/2018 and 9/1/2018. To remove
these dates, change the axis type from Date axis to Text axis.
1. Right click the horizontal axis, and then click Format Axis.
Axis Titles
To add a vertical axis title, execute the following steps.
2. Click the + button on the right side of the chart, click the arrow next to
Axis Titles and then click the check box next to Primary Vertical.
3. Enter a vertical axis title. For example, Visitors.
Result:
Axis Scale
By default, Excel automatically determines the values on the vertical axis.
To change these values, execute the following steps.
1. Right click the vertical axis, and then click Format Axis.
The Format Axis pane appears.
Result:
Trendline
This example teaches you how to add a trendline to a chart in Excel.
2. Click the + button on the right side of the chart, click the arrow next to
Trendline and then click More Options.
Result:
Explanation: Excel uses the method of least squares to find a line that best
fits the points. The R-squared value equals 0.9295, which is a good fit. The
closer to 1, the better the line fits the data. The trendline predicts 120 sold
Wonka bars in period 13. You can verify this by using the equation. y =
7.7515 * 13 + 18.267 = 119.0365.
Error Bars
Add Error Bars | Custom Error Bars
This page teaches you how to quickly add error bars to a chart in Excel,
followed by instructions for adding custom error bars.
2. Click the + button on the right side of the chart, click the arrow next to
Error Bars and then click More Options.
Notice the shortcuts to add error bars using the Standard Error, a
percentage value of 5%, or 1 standard deviation.
The Format Error Bars pane appears.
5. For example, click Fixed value and enter the value 10.
6. If you add error bars to a scatter plot, Excel also adds horizontal error
bars. To remove the horizontal error bars, select them and press Delete.
Result:
2. Select the range A1:D1, hold down CTRL, and select the range A8:D8
(means).
Result:
5. Click the + button on the right side of the chart, click the arrow next to
Error Bars and then click More Options.
The Format Error Bars pane appears.
8. Click OK.
Result:
Sparklines
Create Sparklines | Customize Sparklines | Sparkline Types | Sparkline
Axes | Hidden and Empty Cells
Sparklines in Excel are graphs that fit in one cell. Sparklines are great
for displaying trends. Excel offers three sparkline types: Line, Column and
Win/Loss.
Create Sparklines
To create sparklines, execute the following steps.
1. Select the cells where you want the sparklines to appear. In this
example, we select the range G2:G4.
2. On the Insert tab, in the Sparklines group, click Line.
3. Click in the Data Range box and select the range B2:F4.
4. Click OK.
Result:
2. On the Sparkline tab, in the Show group, check High Point and Low
Point.
Result:
Note: to make the sparklines larger, simply change the row height and
column width of the sparkline cells.
3. On the Sparkline tab, in the Style group, choose a nice visual style.
Result:
Note: the high points are colored green now and the low points are colored
red.
Note: when creating multiple sparklines at once (one for each row or
column of data), your sparklines are grouped. To customize each sparkline
individually, first select the grouped sparklines and click Ungroup.
Sparkline Types
Excel offers three sparkline types: Line, Column and Win/Loss. You can
easily change to a different type of sparkline at any time.
1. Below you can find the Line sparklines we created in the previous two
paragraphs.
Result:
4. Select the column sparklines.
6. On the Sparkline tab, in the Show group, uncheck High Point and Low
Point and check Negative Points.
Result:
Sparkline Axes
By default, each sparkline has its own vertical scale. The maximum value
is plotted at the top of the cell. The minimum value is plotted at the
bottom of the cell.
1. Below you can find the column sparklines we created in the previous
paragraph.
Note: all green bars have the same height, but the maximum values (B2,
E3 and F4) are different!
4. Under Vertical Axis Minimum Value Options and Vertical Axis Maximum
Value Options, select Same for All Sparklines.
Result:
Conclusion: now you can clearly see that the earnings of Jack are much
higher.
5. Here's another cool little trick. Below you can find three sparklines with
negative values.
Result:
Note: the horizontal axis only appears if the sparkline has data that
crosses the zero axis. On the Sparkline tab, in the Style group, click Marker
Color to change the color of the negative points.
Note: to show hidden data in a sparkline, check "Show data in hidden rows
and columns".
4. You can show empty cells as gaps (first sparkline below), zero (second
sparkline below) or connect the data points with a line (third sparkline
below).
Combination Chart
A combination chart is a chart that combines two or more chart types in
a single chart.
2. On the Insert tab, in the Charts group, click the Combo symbol.
4. For the Rainy Days series, choose Clustered Column as the chart type.
7. Click OK.
Result: