class RatatuiRuby::Sparkline

Displays high-density data in a compact row.

Users need context. A single value (“90% CPU”) tells you current status, but not the trend. Full charts take up too much room.

This widget solves the density problem. It condenses history into a single line of variable-height blocks.

Use it in dashboards, headers, or list items to providing trending data at a glance.

Examples

Sparkline.new(
  data: [1, 4, 3, 8, 2, 9, 3, 2],
  style: Style.new(fg: :yellow)
)