Moey Icons
No results. Try “dialog”, “dark” or “grid”.
Moey extras

Charts

Bar, line, area and donut charts — from a plain table you already have. Point at any part (or tap it, or use the arrow keys) to read the values; the legend hides and shows series; one switch turns the chart back into its table. Colors are checked for color-blind readers, in light and dark.

Revenue by monthOnline and in store, first half of 2026
MonthOnlineIn store
Jan42003100
Feb48002900
Mar51003400
Apr59003600
May63003300
Jun71003900
<figure class="chart" data-moey-chart="bar" data-moey-format="currency:USD">
  <figcaption>Revenue by month<small>Online and in store, first half of 2026</small></figcaption>
  <table>
    <thead>
      <tr><th>Month</th><th>Online</th><th>In store</th></tr>
    </thead>
    <tbody>
      <tr><td>Jan</td><td>4200</td><td>3100</td></tr>
      <tr><td>Feb</td><td>4800</td><td>2900</td></tr>
      <tr><td>Mar</td><td>5100</td><td>3400</td></tr>
      <tr><td>Apr</td><td>5900</td><td>3600</td></tr>
      <tr><td>May</td><td>6300</td><td>3300</td></tr>
      <tr><td>Jun</td><td>7100</td><td>3900</td></tr>
    </tbody>
  </table>
</figure>

The first column is the labels; every other column is a series. Numbers may carry symbols and separators ($4,200) — or put the exact value in data-value and write the cell any way you like. The table stays in the page for screen readers, and for everyone behind the Table switch.

Line

For change over time. Hovering shows every series at that point, so nobody has to aim at a 2px line.

Visitors per monthBy where they came from
MonthSearchDirectSocial
Jan820410120
Feb910460150
Mar880520170
Apr1040560210
May1210610260
Jun1180700300
Jul1320690330
Aug1460760390
Sep1390820420
Oct1580860480
Nov1720910510
Dec1850990560
<figure class="chart" data-moey-chart="line" data-moey-format="compact">
  <figcaption>Visitors per month</figcaption>
  <table>
    <thead>
      <tr><th>Month</th><th>Search</th><th>Direct</th><th>Social</th></tr>
    </thead>
    <tbody>
      <tr><td>Jan</td><td>820</td><td>410</td><td>120</td></tr>
      <tr><td>Feb</td><td>910</td><td>460</td><td>150</td></tr>
      …
    </tbody>
  </table>
</figure>

Area

A line with a soft fill — for one total. Add data-moey-stacked for parts that add up.

Sign-upsLast 14 days
DaySign-ups
Nov 1032
Nov 1141
Nov 1238
Nov 1355
Nov 1461
Nov 1558
Nov 1672
Nov 1780
Nov 1877
Nov 1991
Nov 20104
Nov 21118
Nov 22112
Nov 23126
<figure class="chart" data-moey-chart="area">
  <figcaption>Sign-ups</figcaption>
  <table>
    <thead>
      <tr><th>Day</th><th>Sign-ups</th></tr>
    </thead>
    <tbody>
      <tr><td>Nov 10</td><td>32</td></tr>
      <tr><td>Nov 11</td><td>41</td></tr>
      …
    </tbody>
  </table>
</figure>

Stacked bars

Parts of a whole, per category. The tooltip adds the total.

Support tickets this week
DaySolvedWaitingEscalated
Mon1894
Tue2276
Wed15123
Thu2685
Fri20107
<figure class="chart" data-moey-chart="bar" data-moey-stacked>
  <figcaption>Support tickets this week</figcaption>
  <table>
    <thead>
      <tr><th>Day</th><th>Solved</th><th>Waiting</th><th>Escalated</th></tr>
    </thead>
    <tbody>
      <tr><td>Mon</td><td>18</td><td>9</td><td>4</td></tr>
      <tr><td>Tue</td><td>22</td><td>7</td><td>6</td></tr>
      …
    </tbody>
  </table>
</figure>

Horizontal bars

For rankings and long names. data-moey-labels prints each value at the tip of its bar.

Best sellersUnits sold in November
ProductUnits
Linen shirt1284
Canvas tote1102
Wool beanie860
Leather wallet642
Cotton socks (3 pairs)517
<figure class="chart" data-moey-chart="bar" data-moey-horizontal data-moey-labels>
  <figcaption>Best sellers</figcaption>
  <table>
    <thead>
      <tr><th>Product</th><th>Units</th></tr>
    </thead>
    <tbody>
      <tr><td>Linen shirt</td><td>1284</td></tr>
      <tr><td>Canvas tote</td><td>1102</td></tr>
      …
    </tbody>
  </table>
</figure>

Donut

Shares of one total — best with a few parts. The middle shows the total, or the part you point at. Give a part its own color with <tr data-color="…">.

Where visitors came from
SourceVisits
Search4820
Direct2310
Social1460
Email980
Referral410
<figure class="chart" data-moey-chart="donut" data-moey-center="Visits">
  <figcaption>Where visitors came from</figcaption>
  <table>
    <thead>
      <tr><th>Source</th><th>Visits</th></tr>
    </thead>
    <tbody>
      <tr><td>Search</td><td>4820</td></tr>
      <tr><td>Direct</td><td>2310</td></tr>
      …
    </tbody>
  </table>
</figure>

Sparklines

A tiny trend for stat tiles: data-moey-spark with the numbers. It takes the text color — or a theme-* color.

Revenue
$48,210
Orders
1,284
Refunds
23
<span class="chart-spark" data-moey-spark="31,34,33,38,41,40,45,48"></span>
<span class="chart-spark theme-red" data-moey-spark="9,12,8,14,11,17,19,23"></span>

In a card

Charts fit any container and redraw when it changes size — on a phone, in a grid, in a sidebar.

Visitors per month
MonthSearchDirectSocial
Jan820410120
Feb910460150
Mar880520170
Apr1040560210
May1210610260
Jun1180700300
Jul1320690330
Aug1460760390
Sep1390820420
Oct1580860480
Nov1720910510
Dec1850990560
Sources
SourceVisits
Search4820
Direct2310
Social1460
Email980
Referral410
<div class="card">
  <div class="card-body">
    <figure class="chart" data-moey-chart="line">…</figure>
  </div>
</div>

From JavaScript

Give the data to Moey.chart() — it writes the table for you — and call update() when it changes. The colors stay with their series.

Live orders
<figure class="chart" id="orders">
  <figcaption>Live orders</figcaption>
</figure>

<script>
  const chart = Moey.chart('#orders', {
    type: 'bar',                                   // bar · line · area · donut
    labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
    series: [
      { name: 'Paid', data: [42, 51, 38, 60, 57] },
      { name: 'Refunded', data: [3, 5, 2, 4, 6], color: 'red' },
    ],
    format: 'compact',                             // or 'currency:EUR', 'percent'
  });
  chart.update({ series: [ … ] });               // redraws, keeps colors
</script>

Colors

Series take these eight colors in this order. The order is what keeps neighbors apart for color-blind readers — every pair next to each other differs in both hue and lightness — so a ninth series should become "Other" (data-color="gray") rather than a new color. Dark mode uses its own checked steps. Pick one by name with data-color on the column's <th> when a color means something (refunds in red).

1 · blue
2 · orange
3 · teal
4 · amber
5 · pink
6 · green
7 · purple
8 · red

Accessible by default

  • The data is a real table: screen readers read it, and the Table switch shows it to everyone.
  • Tab to a chart, then use ← → (↑ ↓), Home, End to read each point — the values are announced.
  • Names are never color-only: a legend for two or more series, labels in the tooltip, and the table.
  • Tap targets cover the whole column, not the thin mark; a sideways drag on a phone reads along the chart while up/down still scrolls the page.
  • Animations play once, when the chart scrolls into view, and never with reduced motion.

Reference

On the <figure class="chart">What it does
data-moey-chart="bar|line|area|donut"The kind of chart, drawn from the table inside
data-moey-stackedBars or areas stack up (parts of a total)
data-moey-horizontalBars run sideways (rankings, long names)
data-moey-labelsValues at the bar tips
data-moey-format="currency:EUR|percent|compact"How numbers show (axis, tooltip, table); axes shorten big numbers (12K) by themselves
data-moey-baseline="auto"Lines: fit the data instead of starting at 0
data-moey-center="Visits"Donut: the word under the total
<th data-color="red"> · <tr data-color> · <td data-value>A series' color · a donut part's color · the exact number of a cell
--mo-chart-height · --mo-chart-1 … 8 · .chart-swatch-1 … 8The plot height (16rem; donut 13rem) · the palette · the palette as swatches
Moey.chart(el, { type, labels, series, format })Draw from data → { update(data), data, el }
Event moey:toggleA series was hidden or shown from the legend (detail: { index, shown })
<span class="chart-spark" data-moey-spark="1,4,2">A sparkline