Skip to content
bahtuiv0.6.0

<baht-sparkline>

Micro trend line — no axes, no ticks, no tooltip. Used inside <baht-stat> and anywhere a number needs its recent shape beside it.

30-day balance

<baht-sparkline width="160" height="32"></baht-sparkline>

<script>
  const el = document.querySelector('baht-sparkline');
  el.values = [
    12400,
    12900,
    12100,
    13600,
    14200,
    13800,
    15100,
    15600
  ];
</script>
NameTypeDefaultDescription
valuesnumber[][]Points, oldest first; under two renders nothing
widthnumber96Drawing width in px
heightnumber24Drawing height in px
accent-lastbooleantrueAccent dot on the newest point
colorstring''Line color; defaults to --baht-chart-muted
labelstring''Accessible name