By the end of this lesson, you will be able to select and configure the five most common Tableau visualizations—bar, line, scatter, heatmap, and map—to effectively communicate data patterns.
What it is
Tableau charts are visual representations of data that allow users to identify trends, outliers, and relationships. A Bar Chart compares categorical values using rectangular bars. A Line Chart displays continuous data over time or ordered categories. A Scatter Plot shows the relationship between two numerical variables. A Heatmap uses color intensity to represent magnitude across a matrix. Finally, a Map View plots geographic data points or regions. These tools rely on dragging fields onto shelves (Rows, Columns, Marks) rather than writing code.Why it matters
- Rapid Insight: Visuals reveal patterns faster than raw tables.
- Comparison: Bar charts make ranking categories intuitive.
- Trend Analysis: Line charts clearly show growth or decline over time.
- Correlation Detection: Scatter plots help identify if two variables move together.
- Spatial Context: Maps provide location-based understanding for logistics or demographics.
Syntax or steps
In Tableau Desktop, visualization creation follows a drag-and-drop workflow: 1. Select a data source. 2. Drag a dimension toColumns and a measure to Rows.
3. Choose the chart type from the "Show Me" panel or change the mark type in the Marks card.
4. Adjust colors, sizes, or labels via the Color, Size, and Label cards.
Example
While Tableau does not use traditional programming syntax for basic charts, we can describe the configuration logic for a combined dashboard view using pseudo-configuration steps.// Scenario: Analyzing Sales by Region and Product Category
// 1. Bar Chart Configuration
Chart Type: Bar
Columns: [Region] (Dimension)
Rows: SUM([Sales]) (Measure)
Color: [Category] (Dimension) -> Creates stacked or grouped bars
// 2. Line Chart Configuration
Chart Type: Line
Columns: YEAR([Order Date]) (Continuous Dimension)
Rows: SUM([Profit]) (Measure)
Detail: [Sub-Category] (Optional for multiple lines)
// 3. Scatter Plot Configuration
Chart Type: Circle
Columns: AVG([Discount]) (Measure)
Rows: SUM([Sales]) (Measure)
Color: [Segment] (Dimension)
Size: COUNT([Order ID]) (Measure)
// 4. Heatmap Configuration
Chart Type: Square
Columns: MONTH([Order Date]) (Discrete Dimension)
Rows: [Category] (Dimension)
Color: SUM([Sales]) (Measure) -> Darker squares indicate higher sales
// 5. Map View Configuration
Chart Type: Symbol/Map
Latitude: [Latitude] (Generated Field)
Longitude: [Longitude] (Generated Field)
Color: SUM([Sales]) (Measure)
Size: COUNT([Customers]) (Measure)
Explanation: Each block defines a specific view. The Bar chart compares total sales across regions. The Line chart tracks profit trends over years. The Scatter plot investigates if discounts correlate with sales volume. The Heatmap identifies peak sales months per category. The Map visualizes geographic sales density.
Common mistakes
- Overloading Scatter Plots: Adding too many dimensions to color or size makes the chart unreadable. Stick to 2-3 key variables.
- Misusing Line Charts: Using line charts for unordered categorical data implies a false continuity. Use bar charts instead.
- Ignoring Scale: In heatmaps, failing to set a proper color range can hide subtle differences. Always check the legend scale.
- Cluttered Maps: Plotting thousands of individual points without aggregation creates a "hairball." Use density maps or aggregate by region.
When to use it
| Chart Type | Best For | Avoid When |
|---|---|---|
| Bar | Comparing discrete categories | Time series with many points |
| Line | Trends over continuous time | Categorical comparisons |
| Scatter | Relationships between two measures | Showing totals or rankings |
| Heatmap | Density or magnitude in a matrix | Precise value comparison |
| Map | Geographic distribution | Data lacks location context |
Practice
Guided Exercise: Create a bar chart showingSUM(Sales) by Category. Then, add Sub-Category to the Color shelf. Observe how the bars split into segments.
Challenge: Build a scatter plot where X-axis is AVG(Discount) and Y-axis is SUM(Profit). Color by Region. Identify which region has the highest profit despite low discounts.
Hint: Look for clusters of green dots (high profit) far to the left (low discount).