ASCII Art Generator
Generate ASCII art charts and visualizations with customizable styles and colors.
Supported Chart Types
| Type | Trigger Keywords | |------|------------------| | Bar Chart | bar chart, histogram, column chart | | Line Chart | line chart, trend, time series | | Pie Chart | pie chart, distribution, percentage | | Flowchart | flowchart, process, workflow | | Gantt Chart | gantt, timeline, schedule | | Table | table, grid, data table | | Tree | tree, hierarchy, org chart | | Box Plot | box plot, statistical, distribution | | Sparkline | sparkline, mini chart, inline |
Style Presets
| Preset | Characteristics |
|--------|-----------------|
| minimal | Single-line borders, simple connectors |
| classic | Double-line borders, box-drawing characters |
| modern | Rounded corners, Unicode symbols |
| retro | ASCII-only, vintage style |
| elegant | Light/shadow effects, decorative elements |
Color Mapping (Terminal)
| Color | Foreground | Background | Hex | |-------|------------|------------|-----| | Red | ▓▒░ | ▓▒░ | #FF6B6B | | Green | ▓▒░ | ▓▒░ | #51CF66 | | Yellow | ▓▒░ | ▓▒░ | #FCC419 | | Blue | ▓▒░ | ▓▒░ | #339AF0 | | Magenta | ▓▒░ | ▓▒░ | #CC5DE8 | | Cyan | ▓▒░ | ▓▒░ | #22B8CF | | White | ▓▒░ | ▓▒░ | #FFFFFF | | Gray | ▓▒░ | ▓▒░ | #868E96 |
Note: Colors use block characters for density visualization (░ ▒ ▓ █).
Chart Generation Examples
Bar Chart
Data: [Alice: 85, Bob: 92, Carol: 78, Dave: 95]
Style: classic
Color: blue
┌─────────────────────────────────────┐
│ Score Distribution │
├──────┬──────────────────────────────┤
│ Alice ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░ 85 │
│ Bob ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░ 92 │
│ Carol ▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░ 78 │
│ Dave ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░ 95 │
└──────┴──────────────────────────────┘
Flowchart
Style: modern
Direction: top-down
┌─────────┐
│ START │
└────┬────┘
│
▼
┌─────────┐ YES
│ Check ├────────┐
│ Input │ │
└────┬────┘ ▼
│ NO ┌─────────┐
▼ │ ERROR │
┌─────────┐ └─────────┘
│ Process │
└────┬────┘
│
▼
┌─────────┐
│ END │
└─────────┘
Gantt Chart
Tasks: [Design: 3d, Dev: 5d, Test: 2d]
Style: minimal
Week: 1 2 3 4 5 6 7
───────────────────────────
Design ████████
Dev ████████████████
Test ████
Pie Chart (Text-based)
Segments: [A: 40%, B: 35%, C: 25%]
Style: classic
╭─────────────╮
╱ ╱ ╲ ╲
╱ ╱ B ╲ ╲
│ │ ▓▓▓▓▓ │ │
│ A │ ▓▓▓▓▓▓▓▓ │ C │
│ │ ▓▓▓▓▓▓▓▓▓ │ │
╲ ╲ ███ ╱ ╱
╲ ╲ ██ ╱ ╱
╰─────────────╯
A = 40% B = 35% C = 25%
Configuration Options
width: 80 # Chart width in characters
height: auto # Auto or fixed height
padding: 1 # Inner padding
title: "Chart Title" # Optional chart title
labels: true # Show/hide axis labels
grid: true # Show/hide grid lines
legend: true # Show/hide legend
color_scheme: default # Color scheme preset
border: true # Show/hide border
ASCII Character Sets
Box Drawing
Single: | - + | ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼
Double: ║ ═ ║ ╔ ╗ ╚ ╝ ╠ ╣ ╦ ╩ ╬
Mixed: ┎ ┒ ┖ ┚ ┞ ┦ ┷ ┸ ┺ ┾
Block Characters (for color density)
Light: ' . : ! * - ═ ╔
Medium: + o O # @ &
Heavy: ▓ █
Connectors
Arrows: > < ^ v │ ─ └ ┘ ├ ┤
Curved: ) ( [ ] { }
Output Format
Always output ASCII art in code blocks for proper display:
```
[ASCII chart content]
```
Include metadata as comment if needed:
# Title: Score Distribution
# Style: classic
# Date: 2025-01-19
┌─────────────────────────────────────┐
│ Score Distribution │
...
Best Practices
- Choose appropriate width: Match content to expected display
- Use consistent spacing: Align elements for readability
- Select style to match context: Retro for CLI, Modern for web
- Limit color usage: 2-3 colors maximum for clarity
- Add labels: Always include axis labels and legends
- Consider density: Use block characters for visual weight
Edge Cases
- Empty data: Show placeholder with "No data" message
- Single value: Adapt to show without comparison
- Very large values: Normalize or use log scale
- Long labels: Truncate or wrap intelligently
- Negative values: Handle appropriately per chart type
微信扫一扫