Nội dung chính
Xem Which of the following shows the correct order of steps for adding a data series to a chart? 2024
Use bar charts to compare data across categories. You create a bar chart by placing a dimension on the Rows shelf and a measure on the Columns shelf, or vice versa.
A bar chart uses the Bar mark type. Tableau selects this mark type when the data view matches one of the two field arrangements shown below. You can add additional fields to these shelves.
For more information about the Bar mark
type, see Bar mark.
Note: At the end of the procedure is an extra step you can take to display totals at the tops of the bars.
Creates Vertical Bars | Creates Horizontal Bars |
To create a bar chart that displays total sales over a four-year period, follow these steps:
- Connect to the Sample – Superstore data source.
- Drag the Order Date dimension to Columns and drag the Sales measure to Rows.
- On the Marks card, select Bar from the drop-down list.
- Drag the Ship Mode dimension to Color on the Marks card.
- Drag the Region dimension to Rows, and drop it to the left of Sales to produce multiple axes for sales by region.
- To view data in the West region only, you can filter out the other regions. To do this, drag the Region
dimension again, this time from the Data pane to the Filters shelf. - In the Filter [Region] dialog box, clear the Central, East, and South check boxes, and then click OK.
Note: In Tableau 2020.2 and later, the Data pane no longer shows Dimensions and Measures as labels. Fields are listed by table or folder.
Notice that the data is aggregated by year and column headers appear. The Sales measure is aggregated as a sum and an axis is created, while the column headers move to the bottom of the view. Tableau uses Line as the mark type because you added the date dimension.
The view changes to a bar chart.
The marks (which are bars in this case) are vertical because the axis is vertical. The length
of each mark represents the sum of the sales for that year. The actual numbers you see here might not match the numbers you see—the sample data changes from time to time.
The view shows how different shipping modes have contributed to total sales over time. The ratios look consistent from year
to year.
This view gives you insight into your
data—for example, how the ship mode changed in the West over the four-year period.
Check your work! Watch steps 1-7 below.
Note: In Tableau 2020.2 and later, the Data pane no longer shows Dimensions and Measures as labels. Fields are listed by table or folder.
One Step Further: Add Totals To Stacked Bars
Adding totals to the tops of bars in a chart is sometimes as simple as clicking the Show Mark Labels icon in the toolbar. But when the bars are broken down by color or size, each individual segment would labeled, rather than the total for the bar. With a few steps, you can add a total label at the top of every bar even when the bars are subdivided as in the view you just created. In
the following procedure you will technically be adding a reference line. But by configuring that “line” in a certain way, you end up with the labels you want.
From the Analytics pane, drag a Reference Line into the view and drop it on Cell.
In the Edit Line, Band, or Box dialog box, set the aggregation for
SUM(Sales) to Sum, set Label to Value, and set Line under Formatting to None:Then click OK to close the Edit Reference Line, Band, or Box dialog box.
Right-click any of the totals on the bar chart and select Format.
In the Format window, in the Reference Line Label area, open the
Alignment control and select the Center option for Horizontal alignment:Other resources
Creation of a Grouped Bar Chart(Link opens in a new window) A knowledge base article with embedded videos that
describes how to create grouped bar charts, also known as side-by-side bar charts.How do I add a data series to an Excel chart?
Right-click the chart, and then choose Select Data. The Select Data Source dialog box appears on the worksheet that contains the source data for the chart. Leaving the dialog box open, click in the worksheet, and then click and drag to select all the data you want to use for the chart, including the new data series.How do I change the order of data in an Excel chart?
Under Chart Tools, on the Design tab, in the Data group, click Select Data. In the Select Data Source dialog box, in the Legend Entries (Series) box, click the data series that you want to change the order of. Click the Move Up or Move Down arrows to move the data series to the position that you want.How do you add a series name in Excel?
Right-click the chart with the data series you want to rename, and click Select Data. In the Select Data Source dialog box, under Legend Entries (Series), select the data series, and click Edit. In the Series name box, type the name you want to use.How do I find the data series in Excel?
You can verify and edit data series at any time by right-clicking and choosing Select Data. In the Select Data Source window, data series are listed on the left. If I edit one of the entries, you can see that the data series has both a name and range of values.
Your view now has currency totals at the top of each bar:
You may need to adjust the view to make it look just right. If the bars are too narrow, the numbers are truncated; to fix this, press Ctrl + Right on the keyboard to make the bars wider. Or if you want to center the totals over the bars—by default, they are left-aligned. Do the following:
Bạn đang tìm hiểu bài viết: Which of the following shows the correct order of steps for adding a data series to a chart? 2024
HỆ THỐNG CỬA HÀNG TRÙM SỈ QUẢNG CHÂU
Điện thoại: 092.484.9483
Zalo: 092.484.9483
Facebook: https://facebook.com/giatlathuhuongcom/
Website: Trumsiquangchau.com
Địa chỉ: Ngõ 346 Nam Dư, Trần Phú, Hoàng Mai, Hà Nội.