VB Project Planning

<burndown-chart>

Sprint burndown plot. Wraps Vanilla Breeze's chart-wc with an auto-computed ideal line and scope-change annotations.

Overview

The <burndown-chart> component plots sprint progress as a two-series line chart: the actual remaining work each day vs. the ideal straight-line trend from total → 0 across the sprint duration.

It composes <chart-wc type="line"> for rendering. The author supplies only the daily remaining counts (and optional scope-change deltas) — the ideal slope is mechanical and should not be hand-computed in author data.

Data source

Provide a <template> child whose <tr> rows have these cells in order:

  1. date — ISO 8601 (YYYY-MM-DD), a calendar day in local time
  2. remaining — number of points/items left at end of day
  3. (optional) ±delta — scope change applied that day (e.g. +5 or -2)

Days with a non-zero 3rd cell are surfaced as a Scope changes aside under the chart so the cause of trend reversals is visible at a glance. Cell text and the unit attribute are rendered as plain text, never parsed as HTML.

The day axis has one entry per calendar day from start to end inclusive, stepped by calendar day, so sprints that span a daylight-saving change neither repeat nor drop a day.

Attributes

AttributeValuesDefaultDescription
heading-levelnumber—Level (1–6) of the Scope changes heading. Default: one below the nearest preceding heading on the page.
startstring—Sprint start date (YYYY-MM-DD, local calendar day; required)
endstring—Sprint end date (YYYY-MM-DD, inclusive; required)
totalnumber—Total points/items at sprint start (required)
unitstring"points"Display unit for the y-axis and scope-change notes (rendered as text)
labelstring—Optional heading text (e.g. "Sprint 14")
weekends"include", "exclude""include"Whether weekends count toward the ideal-line slope

All six attributes are observed. Changing one on a live element re-renders the chart in place; if the new configuration is invalid (for example end before start) the chart is removed and a console warning is logged. An element that refused to upgrade because an attribute was missing upgrades as soon as it is set.

Events

EventDetailDescription
burndown-chart:ready{ dayCount, total, scopeChanges }Fired after each upgrade (first connect, reconnect, or a retried upgrade), in a microtask. Not re-fired when a live attribute change re-renders

Excluding weekends

By default, the ideal line decrements every day equally. For sprints where weekends don't count, set weekends="exclude" — the component holds the ideal value flat over Saturdays and Sundays so the slope reflects working-day capacity:

Progressive Enhancement

  1. HTML. Without JS, the <template> child is invisible (templates do not render). The chart is purely additive over <chart-wc>.
  2. CSS. The :not(:defined) selector keeps the host visible pre-upgrade.
  3. JS. Reads the template, computes the ideal series, builds a <chart-wc> with two series, and surfaces scope changes as a sibling <aside>.

This component requires the optional vanilla-breeze-charts bundle for <chart-wc>:

Related

↑