Empty chart with axes
A chart with no data keeps its axes, scale and a faint ghost line, so the card holds its shape and people can see what will be drawn there.
Loaves sold
Week of 23 November
No sales recorded this weekThe till has been offline since Monday. Sales show up here once it syncs.
The code
Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.
<div class="ukc-empty-chart-axes">
<section class="ch" aria-labelledby="ukc-empty-chart-axes-h">
<header>
<div><h3 id="ukc-empty-chart-axes-h">Loaves sold</h3><p>Week of 23 November</p></div>
<div class="seg" role="group" aria-label="Range"><button type="button" aria-pressed="true">Week</button><button type="button" aria-pressed="false">Month</button><button type="button" aria-pressed="false">Year</button></div>
</header>
<div class="plot">
<ol class="y" aria-hidden="true"><li>300</li><li>200</li><li>100</li><li>0</li></ol>
<div class="area" role="img" aria-label="Empty chart, no sales recorded this week"><svg viewBox="0 0 100 40" preserveAspectRatio="none" aria-hidden="true"><path d="M0 30L16.6 22 33.3 26 50 14 66.6 18 83.3 8 100 12" vector-effect="non-scaling-stroke"/></svg></div>
<div class="msg"><strong>No sales recorded this week</strong><span>The till has been offline since Monday. Sales show up here once it syncs.</span><p><button type="button">Check the till</button><a href="#">See last week</a></p></div>
<ol class="x" aria-hidden="true"><li>Mon</li><li>Tue</li><li>Wed</li><li>Thu</li><li>Fri</li><li>Sat</li><li>Sun</li></ol>
</div>
</section>
</div>
.ukc-empty-chart-axes { position: relative; font-family: var(--uk-font-body, system-ui, sans-serif); color: var(--uk-ink); font-size: 15px; line-height: 1.5;
--tint: color-mix(in srgb, var(--uk-accent) 12%, var(--uk-paper));
--tint-strong: color-mix(in srgb, var(--uk-accent) 22%, var(--uk-paper));
--accent-deep: color-mix(in srgb, var(--uk-accent) 72%, black);
--ink-soft: color-mix(in srgb, var(--uk-ink) 8%, var(--uk-paper));
--line-strong: color-mix(in srgb, var(--uk-ink) 32%, var(--uk-paper));
--danger-tint: color-mix(in srgb, var(--uk-danger) 12%, var(--uk-paper));
--high-tint: color-mix(in srgb, var(--uk-highlight) 28%, var(--uk-paper)); }
.ukc-empty-chart-axes *, .ukc-empty-chart-axes *::before, .ukc-empty-chart-axes *::after { box-sizing: border-box; }
.ukc-empty-chart-axes :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-empty-chart-axes :where(ul, ol) { padding: 0; list-style: none; }
.ukc-empty-chart-axes :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-empty-chart-axes :where(a) { color: inherit; }
.ukc-empty-chart-axes svg { flex: none; }
.ukc-empty-chart-axes .ch { display: grid; gap: 16px; max-width: 620px; padding: 18px; border: 1px solid var(--uk-line); border-radius: var(--uk-radius-lg); background: var(--uk-paper); }
.ukc-empty-chart-axes header { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 10px 16px; }
.ukc-empty-chart-axes h3 { font-size: 17px; line-height: 1.3; }
.ukc-empty-chart-axes header p { font-size: 13px; color: var(--uk-muted); }
.ukc-empty-chart-axes .seg { display: flex; border: 1px solid var(--line-strong); border-radius: var(--uk-radius-md); overflow: hidden; }
.ukc-empty-chart-axes .seg button { padding: 5px 12px; border: 0; background: transparent; font-size: 13px; color: var(--uk-muted); cursor: pointer; }
.ukc-empty-chart-axes .seg button + button { border-left: 1px solid var(--line-strong); }
.ukc-empty-chart-axes .seg button[aria-pressed="true"] { background: var(--uk-ink); color: var(--uk-paper); font-weight: 600; }
.ukc-empty-chart-axes .seg button:focus-visible { outline: 2px solid var(--uk-accent); outline-offset: -3px; }
.ukc-empty-chart-axes .plot { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(190px, auto) auto; gap: 6px 8px; }
.ukc-empty-chart-axes .y { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: space-between; margin: -7px 0; text-align: right; }
.ukc-empty-chart-axes .y, .ukc-empty-chart-axes .x { font-family: var(--uk-font-mono, ui-monospace, monospace); font-size: 11px; color: var(--uk-muted); }
.ukc-empty-chart-axes .area { grid-area: 1 / 2; position: relative; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); background: linear-gradient(var(--uk-line), var(--uk-line)) 0 0 / 100% 1px no-repeat, linear-gradient(var(--uk-line), var(--uk-line)) 0 33.33% / 100% 1px no-repeat, linear-gradient(var(--uk-line), var(--uk-line)) 0 66.66% / 100% 1px no-repeat; }
.ukc-empty-chart-axes .area svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ukc-empty-chart-axes .area path { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 3 6; stroke-linecap: round; }
.ukc-empty-chart-axes .msg { grid-area: 1 / 2; place-self: center; z-index: 1; display: grid; gap: 4px; justify-items: center; max-width: min(300px, calc(100% - 20px)); margin: 10px 0; padding: 14px 16px; border: 1px solid var(--uk-line); border-radius: min(var(--uk-radius-md), 12px); background: var(--uk-paper); text-align: center; font-size: 13px; color: var(--uk-muted); }
.ukc-empty-chart-axes .msg strong { font-size: 15px; color: var(--uk-ink); }
.ukc-empty-chart-axes .msg p { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; margin-top: 8px; }
.ukc-empty-chart-axes .msg button { padding: 7px 13px; border: 0; border-radius: var(--uk-radius-md); background: var(--uk-ink); color: var(--uk-paper); font-size: 13px; font-weight: 600; cursor: pointer; }
.ukc-empty-chart-axes .msg a { color: var(--uk-ink); text-underline-offset: 3px; }
.ukc-empty-chart-axes .msg button:focus-visible, .ukc-empty-chart-axes .msg a:focus-visible { outline: 2px solid var(--uk-accent); outline-offset: 2px; }
.ukc-empty-chart-axes .x { grid-area: 2 / 2; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
More empty states
All 24Deliveries, week of 9 March Order For Window Monday 2 Peony armful Dunmore Hotel 8 to 9 AM Sympathy wreath R. Castellan 1 to 2 PM Tuesday 0 No deliveries on Tuesday. Add one Wednesday 1 Twelve table posies Cafe Lune 7 to 8 AM Side A is blank
Nothing has been recorded for the Marlow sessions yet. Arm a track and roll, or bring in stems from another studio.
The fridge is bare
Nothing is on the shopping list for Flat 3B. One lemon will not make dinner.
- Browse spring plants
Your basket is empty
Orders placed before 2 PM leave the nursery the same day.
Saved for later 2
- Hart's tongue fern1 litre pot, in stock£8.50
- Japanese anemone, white2 litre pot, 3 left£11.00
0of 48 shipments shown
Three filters together leave nothing
- StatusHeld at customs3 alone
- CarrierBaltrans11 alone
- ArrivingThis week19 alone
Nothing held at customs is with Baltrans. Drop either one and 2 shipments come back.
Thursday 12 March
Dr. Okafor, room 2
Nothing booked this morning.
Four hours are open. Offer them to the waiting list