even-wei/Chartdown
A blazingly fast markdown-to-PDF converter that transforms CSV data into beautiful charts, written in Zig. Create data-rich documents with simple synt...
A markdown to PDF converter with embedded charts, written in Zig.
Requires Zig 0.11.0 or later.
git clone [email protected]:even-wei/Chartdown.git
cd Chartdown
zig build
chartdown input.md output.pdf
Charts are embedded in markdown using code blocks with the chart
identifier:
# Sales Report
Our quarterly sales:
chart
{
type: "line",
data: "sales.csv",
x: "date",
y: "revenue",
title: "Quarterly Revenue"
}
Basic options:
type
: Chart type ("line", "bar")data
: Path to CSV file (relative to markdown file)x
: Column name for X axisy
: Column name for Y axistitle
: Chart title (optional)Additional options:
width
: Chart width in pixels (default: 800)height
: Chart height in pixels (default: 400)color
: Line/bar color (default: "#2E86C1")src/
βββ main.zig # Entry point
βββ parser/ # Markdown and chart parsing
βββ chart/ # Chart generation
βββ pdf/ # PDF generation
βββ utils/ # Common utilities
# Build the project
zig build
# Run tests
zig build test
# Install locally
zig build install
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details