chartli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

chartli Skill

chartli 技能

Use this skill when an agent needs to visualize numeric data in the terminal as ASCII/Unicode/SVG charts.
当Agent需要在终端中将数值数据可视化为ASCII/Unicode/SVG图表时,可使用此技能。

Install

安装

sh
npx skills add ahmadawais/chartli
sh
npx skills add ahmadawais/chartli

CLI install/use

CLI安装/使用

Instant use:
sh
npx chartli --help
Global install:
sh
npm i -g chartli
即时使用:
sh
npx chartli --help
全局安装:
sh
npm i -g chartli

What chartli can do

chartli的功能

  • Render chart types:
    ascii
    ,
    spark
    ,
    bars
    ,
    columns
    ,
    heatmap
    ,
    unicode
    ,
    braille
    ,
    svg
  • Read from file path input
  • Read from stdin when no file is passed
  • Control output dimensions with
    --width
    and
    --height
  • Render SVG with
    --mode circles|lines
  • 支持渲染的图表类型:
    ascii
    ,
    spark
    ,
    bars
    ,
    columns
    ,
    heatmap
    ,
    unicode
    ,
    braille
    ,
    svg
  • 支持从指定文件路径读取数据
  • 未传入文件时从stdin读取数据
  • 可通过
    --width
    --height
    参数控制输出尺寸
  • 可使用
    --mode circles|lines
    参数渲染SVG

Command templates

命令模板

From file:
sh
npx chartli <file> -t <type> [--width N] [--height N] [--mode circles|lines]
From stdin:
sh
printf 'x y\n1 10\n2 20\n3 15\n' | npx chartli -t ascii -w 24 -h 8
Per-type examples:
sh
npx chartli data.txt -t ascii -w 24 -h 8
npx chartli data.txt -t spark
npx chartli data.txt -t bars -w 28
npx chartli data.txt -t columns -h 8
npx chartli data.txt -t heatmap
npx chartli data.txt -t unicode
npx chartli data.txt -t braille -w 16 -h 6
npx chartli data.txt -t svg -m lines -w 320 -h 120
从文件读取:
sh
npx chartli <file> -t <type> [--width N] [--height N] [--mode circles|lines]
从stdin读取:
sh
printf 'x y\n1 10\n2 20\n3 15\n' | npx chartli -t ascii -w 24 -h 8
各类型示例:
sh
npx chartli data.txt -t ascii -w 24 -h 8
npx chartli data.txt -t spark
npx chartli data.txt -t bars -w 28
npx chartli data.txt -t columns -h 8
npx chartli data.txt -t heatmap
npx chartli data.txt -t unicode
npx chartli data.txt -t braille -w 16 -h 6
npx chartli data.txt -t svg -m lines -w 320 -h 120

Input format

输入格式

Whitespace-separated numeric rows; optional header row is allowed.
text
day sales costs profit
1 10 8 2
2 14 9 5
3 12 11 3
空格分隔的数值行,允许可选的表头行。
text
day sales costs profit
1 10 8 2
2 14 9 5
3 12 11 3

Repository example assets

仓库示例资源

  • examples/assets/core-single-series.txt
  • examples/assets/core-multi-series.txt
  • examples/assets/image-data.txt
  • examples/assets/image-columns-variant.txt
  • examples/assets/core-single-series.txt
  • examples/assets/core-multi-series.txt
  • examples/assets/image-data.txt
  • examples/assets/image-columns-variant.txt