Terminal charts for CandyCore
Sparkline, Bar, Line, Heatmap, Scatter, TimeSeries, Streamline, Waveline, OHLC, plus inline image rendering via Sixel / Kitty / iTerm2 protocols. Auto-detects terminal capability.
composer require candycore/sugar-charts
use CandyCore\Charts\Sparkline\Sparkline;
use CandyCore\Charts\BarChart\BarChart;
use CandyCore\Charts\LineChart\LineChart;
echo Sparkline::new([1, 3, 2, 8, 5, 4, 7, 6], 8)->view() . PHP_EOL;
// โโโโโ
โโโ
echo BarChart::new(
[['cpu', 0.7], ['mem', 0.4], ['disk', 0.9]], 20, 5
)->view() . PHP_EOL;
echo LineChart::new([1, 4, 2, 8, 6, 3, 7], 30, 6)->view();
VHS-recorded GIFs of every example shipped with the library. Regenerated automatically on every push that touches the source.