Creating line charts

Although line charts are best used for time-series data to observe trends by various time units, such as day, week, month, quarter, and year, they could be used for other types of data as well; however, the ups and downs in the lines themselves are less important in such cases.

Getting ready

Let's use the sample file, Sample – Superstore Sales (Excel). Open a new worksheet and select Sample – Superstore Sales (Excel) as the data source.

How to do it...

Once the data is loaded, perform the following steps to create a line chart:

  1. Drag-and-drop Order Date into the Columns shelf. Tableau, by default, will show YEAR(Order Date).
  2. Drag-and-drop Sales into the Rows shelf.
  3. To observe the trends by month of orders, click on YEAR(Order Date), which is shown in the Columns shelf, and click on Month, as shown in the following screenshot:
    How to do it...
  4. Drag-and-drop Order Date into the Columns shelf again, but this time in front of the MONTH(Order Date) field. This change will show the trend by month of every year, as shown in this following screenshot:
    How to do it...

How it works...

Line charts are quite effective in representing trends over time. These trends, however, could be misrepresented if improper zoom level, axis scale units, or aspect ratios are used. For example, if a reader is observing a line chart that has hour as the unit, the reader may think that the observed measure fluctuates quite often. But if the axis unit is changed to months, the lines will show trends over a longer time period and will not show major fluctuations, as shown in the chart with hour as the axis unit. The chart designer should carefully select the unit of time for the x axis.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset