Expand description
Plain-text chart renderer. Draws ChartSpec as a block of text
suitable for the CLI’s log region, terminal stdout, or any
context where SVG/canvas/ratatui widgets aren’t available.
Bar and stacked-bar specs render as horizontal bars sized to the biggest magnitude. Line specs render as a per-series sparkline. The output is purely monospace text — no colour — so it survives pasting into logs and scrolling.
Functions§
- render_
text - Render
specto a multi-line string.widthcontrols how wide each bar gets (min 10, max ~200 is sensible). - render_
text_ default - Default-width convenience wrapper: 48 columns, readable in the typical terminal log pane.