DayBarChart

Molecule

One bar per day, the 90-day uptime strip of a status page, drawn with the same DOM as kui-react. Coloured by availability, with the height, an incident marker and the day's accessible name carrying the same meaning, a tooltip on hover and focus, a pinned details dialog on click or Enter, and a legend. The server draws the strip, the heading, the summary, the range, the legend and the popover of an initially pinned day; a small idempotent script (`modules/ui/DayBarChart/scripts/daybar.js`, inlined once per page) adds the tooltip, the pin, the roving tabindex and the keys. `onSelect` is the bubbling DOM event `kui:daybar-select` { day, date, popover }; `root.kuiDayBarChart.select(date)` pins from the page, and a chart drawn with `selectedDate` is controlled by it. `renderDetails` is `detailsPartial` (a partial included in the popover of an initially pinned day); a day pinned in the browser hands its dialog element to the event for the page to append to. Reusable per component and per region: pass a `label`.

API, 90 days

Preview

API

99.83% uptime over 90 days
  • Operational (99.9% or more)
  • Degraded (99% to 99.9%)
  • Outage (below 99%)
  • No data (no data)
  • Incident

Hover, focus or click a day.

Code
<%- include('modules/ui/DayBarChart', { label: 'API', days: days }) %>
<script>
  document.addEventListener('kui:daybar-select', function (e) {
    // e.detail = { day: { date, availability, incidents } | null, date, popover }
  });
</script>

Per region, with a gap and custom thresholds

Preview

EU region

99.85% uptime over 90 days

US region

99.86% uptime over 90 days
Code
<%- include('modules/ui/DayBarChart', { label: 'EU region', days: days, thresholds: { operational: 99.95, degraded: 99.5 }, showLegend: false }) %>

A pinned day, the controlled form

Preview

Checkout

99.79% uptime over 30 days
Code
<%- include('modules/ui/DayBarChart', { label: 'Checkout', days: days, selectedDate: '2026-10-18' }) %>
<script>
  // controlled: a click only fires 'kui:daybar-select'; the page pins
  chart.kuiDayBarChart.select('2026-10-03');
</script>
Source modules/ui/DayBarChart.ejs