Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Tableau 10 Business Intelligence Cookbook

You're reading from   Tableau 10 Business Intelligence Cookbook Create powerful, effective visualizations with Tableau 10

Arrow left icon
Product type Paperback
Published in Nov 2016
Publisher Packt
ISBN-13 9781786465634
Length 476 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Donabel Santos Donabel Santos
Author Profile Icon Donabel Santos
Donabel Santos
Paul Banoub Paul Banoub
Author Profile Icon Paul Banoub
Paul Banoub
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Basic Charts FREE CHAPTER 2. Advanced Charts 3. Interactivity 4. Dashboards and Story Points 5. Maps and Geospatial Visualization 6. Analytics 7. Data Preparation A. Calculated Fields Primer B. Resources Index

Creating an area chart

An area chart is very similar to a line chart (time series graph) with the area between the axis and the line shaded. A stacked area chart segregates the area, based on related categories. Area charts may allow trends to be more easily spotted because the eye focuses on a bigger area rather than comparing lines.

In this recipe, we will create an area chart that will show the results of restaurant re-inspections in New York City from June 2012 to June 2016.

Creating an area chart

Getting ready

To follow this recipe, open B05527_01 – STARTER.twbx. Use the worksheet called Area, and connect to the DOHMH New York City Restaurant data source.

Getting ready

How to do it...

The following are the steps to create the area chart for re-inspections:

  1. Change the mark type to Area in the Marks card.
  2. From Measures, drag Number of Records to Rows.
  3. From Dimensions, right-click and drag Inspection Date to Columns. This will open a window asking for the specific value to place.
  4. Choose continuous month. This is the MONTH(Inspection Date) option in the fourth section, with a green calendar icon to its left.
    How to do it...
  5. From Dimensions, right-click drag Inspection Date to Filter. This will open a window that shows the possible variation of values that can be used.
  6. Choose to filter by discrete year, which is the third option called Years with a blue # beside it, and then click Next >.
    How to do it...
  7. Under the General tab, choose all years except for 1900.
    How to do it...
  8. Under the Wildcard tab:
    • Type the keyword Re-inspection in the Match value: text box
    • Choose Contains in the radio button options
    • Leave the checkbox to Include all values when empty checked
    How to do it...
  9. From Dimensions, right-click and drag Grade to Color in the Marks card.
  10. Click on the drop-down arrow beside the color legend and choose Edit colors….
  11. Choose the Color Blind 10 palette and click on Assign Palette. Click on OK when done.
  12. Right-click on an empty area in your chart and select Annotate, and then Area.
  13. Add the following annotation, and place it on top of the area that represents the A grades.
    How to do it...

How it works...

Area charts look like line charts (or time series graphs) that have shaded areas. Area charts are also similar to stacked bar charts, where the areas are cumulative. It is best used when you want to show the cumulative value of the measures you are using. Area charts, however, bear the same risks as the stacked bar chart. Because individual areas are stacked, it is hard to compare the different areas because they don't all start in the same level.

Creating an area chart is similar to creating your line chart and your stacked bar chart. You create a time series graph first. By default, Tableau will create a time series graph (or line graph) first when you put a Date or Date & Time field in either Rows or Columns, and a Measure in the other.

Once you have the time series graph, you can change the mark to Area, and drop a dimension in Color in the Marks card to create the different colored areas.

There's more...

I've often asked students in my training classes when they would usually use area charts, and majority of the time students mention budgeting. With budgeting, they care about what proportion over time goes to which categories, but they also care about the cumulative value of the budget.

See also

  • Please refer to the Creating a stacked bar chart recipe in this chapter
You have been reading a chapter from
Tableau 10 Business Intelligence Cookbook
Published in: Nov 2016
Publisher: Packt
ISBN-13: 9781786465634
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime