14. Visuals and Their Formatting
14.5 Line, Area and Stacked Area Charts
In short: A line chart shows change over a continuous axis such as dates.
Start with a problem
Ravindra wants to see how daily orders moved at the fictional Nagpur Dharampeth store in the first two weeks of April 2026 (start of FY 2026-27).
Explain simply
A line chart shows change over a continuous axis such as dates. An area chart fills under the line to stress volume. A stacked area chart stacks several series, so the top edge is the total.
Show the data
| Date | Weekday | Orders |
|---|---|---|
| 01-Apr | Wed | 118 |
| 04-Apr | Sat | 131 |
| 05-Apr | Sun | 140 |
| 10-Apr | Fri | 236 |
| 14-Apr | Tue | 118 |
About this data: This table uses columns: Date, Weekday, Orders. This table uses columns: Measure, Value. This table uses columns: Wrong result, Reason, Correction. Values shown are the lesson examples already on this page (not a new dataset).
Fictional sample data. Practice file: daily_orders_nagpur_apr2026.csv (source: src/practice/).
Demonstrate
- Load
daily_orders_nagpur_apr2026.csv(14 rows). - Insert a Line chart: X-axis
Date, Y-axisOrders. - In the X-axis well, click the arrow next to
Date› choose Date (not Date Hierarchy). Why: one point per day. - Format › Visual › X-axis › Type Continuous.
- Switch the visual to Area chart and compare.
Show the result
Your result should look like this (fictional sample):
| Measure | Value |
|---|---|
| Total orders (14 days) | 1,860 |
| Average per day | 132.9 |
| Highest day | Fri 10-Apr, 236 |
| Average without 10-Apr | 124.9 |
Explain what happened
Each point is the sum of Orders for one date. Because the axis is continuous, the spacing between days is equal and gaps would show as missing dates instead of being squeezed out.
Explore further
- Add an average line from the Analytics pane (section 14.23).
- Stacked area works when parts add to a meaningful total, such as orders by platform.
Detailed reference for this lesson:
Line chart. Use for trends over continuous time. Avoid for unordered categories or more than 4–5 lines. Field wells: X-axis, Y-axis, Secondary y-axis, Legend, Small multiples, Tooltips. Example: X = 'Date'[Date], Y = Total Orders and Orders LY. The Diwali and Ganeshotsav spikes are clearly visible. Formatting: Lines (stroke width, style solid/dashed/dotted, Interpolation type such as step), Markers (on/off, shape, size), X-axis Type Continuous vs Categorical, Y-axis start at zero, Data labels for the last point only (series options).
Area chart. Use for trends where the volume matters. Stacked area shows how series add up to a total (Orders by Category over months). Avoid stacked areas with many series, because small layers become unreadable. Field wells are similar to the line chart (X-axis, Y-axis, Legend, Small multiples, Tooltips). Formatting: Shade area transparency, lines, markers.
Steps in Power BI – orders by hour of day (a classic quick-commerce chart)
- Insert a Line chart. X-axis =
Orders[Order Hour], Y-axis =[Total Orders], Legend =Orders[Platform]. - Visual › X-axis › Type = Categorical (so all 24 hours show). Sort by Order Hour ascending (… › Sort axis).
- Visual › Markers › On. Lines › Stroke width 3.
- Analytics › Average line › add (14.23). General › Title: "Orders by Hour (IST)".
Practice task
Create a stacked area chart of Total Sales by Month with Category as the legend. Then switch to a line chart with small multiples by City and compare readability.
Ravindra Bagale's Tip
Friends, remember: a stacked area chart hides the trend of the upper layers, and many students use it for too many categories. For more than three or four series, use a line chart or small multiples. Also make sure the X-axis is continuous for dates so gaps are shown correctly. Clear?
Ravindra Bagale's Tip – मराठी
मित्रांनो, लक्षात ठेवा: stacked area chart वरच्या थरांचा trend लपवतो, आणि बरेच students तो खूप जास्त categories साठी वापरतात. तीन-चार पेक्षा जास्त series असतील तर line chart किंवा small multiples वापरा. आणि dates साठी X-axis continuous आहे याची खात्री करा, म्हणजे gaps बरोबर दिसतील. समजलं का?
Ravindra Bagale's Tip – हिंदी
दोस्तों, याद रखो: stacked area chart ऊपर वाली परतों का trend छिपा देता है, और बहुत से students उसे बहुत ज़्यादा categories के लिए इस्तेमाल करते हैं. तीन-चार से ज़्यादा series हों तो line chart या small multiples इस्तेमाल करो. और dates के लिए X-axis continuous हो यह पक्का करो, ताकि gaps सही दिखें. समझ आया?
Fix common mistakes
| Wrong result | Reason | Correction |
|---|---|---|
| Only 2026 appears on the axis | Date Hierarchy at Year level | Choose Date instead of Date Hierarchy, or drill down |
| Line jumps over a missing day | Categorical axis | Set the X-axis type to Continuous |
| Stacked area tells a false story | Series do not add up to a whole | Use separate lines instead |
Practise independently
Practice task
Using the daily file, which weekday pattern do you see on 4–5 April and 11–12 April?
Hints
- Look at Sat and Sun values.
- Compare with weekday values around 117–123.
Solution
Weekends are higher: 131, 140 and 133, 142 versus weekdays mostly 117–123. 10-Apr (236) is a one-day spike to investigate separately.
Think like a professional
A line chart starts a conversation; it does not explain causes. A professional adds the context the manager needs – weekday pattern, a known promotion – and checks the raw rows before calling something a trend.
Revision card