14. Visuals and Their Formatting
14.5 Line, Area and Stacked Area Charts
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
Mitrano, lakshat theva: 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. Samjla ka?