Skip to content

neswal/neswal-charts

Repository files navigation

Neswal Charts — Excel → branded SVG/HTML charts

A small, dependency-light toolkit that turns an Excel table into a clean, self-contained HTML chart with embedded SVG, in three styles — Apple-clean, Economist and Neswal (neswal.at brand design) — with a built-in style toggle. No build step, no config — point a script at an .xlsx file (or double-click a launcher and pick one).

Currently included:

Tool What it does Input
mta_chart.py Milestone Trend Analysis (45° diagonal) reporting dates × milestone forecasts

More chart types share the same design source and will be added over time.

All tools share one design source — the neswal_charts package — so colours, fonts, the logo and the HTML shell stay consistent across charts.

Structure

neswal-charts/
├── neswal_charts/          # shared package = the single source of truth
│   ├── style.py            #   fonts, palettes, the three design identities, base rc
│   ├── branding.py         #   logo finder
│   ├── excel.py            #   cell/date parsers, xlsx reader
│   └── html.py             #   HTML shell (CSS, style switch, toggles, tooltips, page builder)
├── mta_chart.py            # Milestone Trend Analysis  (uses neswal_charts)
├── assets/logo.png         # brand wordmark (Neswal design only; optional)
├── examples/               # sample .xlsx files
└── *.command / *.bat       # double-click launchers (macOS / Windows)

Quick start (no terminal)

Install uv once, then double-click the launcher for your OS — it lets you pick an .xlsx and writes HTML + SVG next to it:

  • macOSMTA-Diagramm erzeugen (Mac).command (first run: right-click → Open to clear Gatekeeper)
  • WindowsMTA-Diagramm erzeugen (Windows).bat (double-click to pick a file, or drag an .xlsx onto it)
# macOS / Linux — install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell) — install uv
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Usage (terminal)

The scripts declare their dependencies inline (PEP 723), so uv installs matplotlib + openpyxl automatically on first run — nothing to set up.

uv run mta_chart.py examples/Mustertabelle.xlsx --svg

Writes <name>.html next to the table (open in any browser); --svg adds a standalone .svg per style. Common options: -t "Title", --style {all,apple,economist,neswal}, -o out.html.

In the HTML output, hovering a milestone node with the mouse shows a tooltip with its reporting date, forecast date and the shift against the previous report. Standalone --svg files stay static: they carry neither hover targets nor script.

Without uv (plain pip)

python3 -m venv .venv && source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install matplotlib openpyxl
python mta_chart.py examples/Mustertabelle.xlsx

Input format

MTA (mta_chart.py)

First row with ≥2 date values = reporting dates (X-axis); every following named row is a milestone with its forecast dates. Optional rows: Titel, Ränder (axis margin in days). Dates are real Excel date cells or text DD.MM.YY. See examples/Mustertabelle.xlsx.

Notes

  • Fonts use a system cascade (svg.fonttype="none"), so the SVG renders in San Francisco on macOS, Segoe UI on Windows — the file itself stays portable. The Neswal design additionally uses Oxanium (title) and IBM Plex Mono (figures) and places the wordmark from assets/logo.png (omitted gracefully if the asset is absent).
  • Chart labels are German; easy to localize in the respective script.

Extending

Add a new chart as <name>_chart.py next to the others and import neswal_charts for the design, logo, Excel and HTML helpers — the brand stays consistent automatically.

License

MIT © 2026 Michael Neswal

About

Excel → branded SVG/HTML charts (MIT). Turns an Excel table into a clean, self-contained HTML chart with embedded SVG in three styles.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors