Skip to content

primaviz:0.4.1#4270

Merged
saecki merged 4 commits intotypst:mainfrom
phiat:primaviz-0.4.0
Mar 5, 2026
Merged

primaviz:0.4.1#4270
saecki merged 4 commits intotypst:mainfrom
phiat:primaviz-0.4.0

Conversation

@phiat
Copy link
Copy Markdown
Contributor

@phiat phiat commented Mar 5, 2026

Thanks to @dayala1 for the detailed feedback that prompted the 0.2.0 release and improvements since.

Summary

Pure-Typst charting library with 50+ chart types, 6 themes, and zero dependencies. Built entirely with native Typst primitives (rect, circle, line, polygon, place).

Changes since 0.1.1 (last published version)

0.4.1 — Patch release

  • Updated demo and showcase screenshots reflecting all 0.4.0 visual changes
  • Version string updates across all files

0.4.0 — Color system, primitives upgrade, layout fixes

  • 10 named color palettes: viridis, heat, blues, greens, reds, purples, inferno, plasma, coolwarm, spectral (+ grayscale)
  • Custom palette arrays: pass any array of colors as a palette to heatmap/calendar-heatmap
  • N-stop continuous interpolation: smooth gradients replacing 4-segment piecewise (eliminates banding)
  • Palette reversal: reverse: true param or "-r" suffix (e.g., "viridis-r")
  • Gradient legend primitive: reusable draw-gradient-legend for color-mapped charts
  • Axis tick marks (show-ticks) and minor grid lines (show-minor-grid)
  • Subtitle param on chart containers and titles
  • Rounded corners (radius) on chart containers
  • Bubble size legend: reference circles with perceptual area scaling
  • Waterfall color key and Gantt group legend support
  • Legend title support on all legend functions
  • Configurable side-legend width in chart containers
  • Layout fixes: size legend, radar legend, x-axis label positioning

0.3.0 — Data consolidation, label improvements

  • 5 themed demo datasets: sales, codebase, league, rpg, words (loaded from JSON)
  • JSON data loaders: load-simple, load-series, load-scatter, load-bubble, load-hierarchy
  • Smart label placement: try-fit-label shrinks fonts before hiding, greedy-deconflict resolves overlapping labels
  • CLI converter: scripts/convert-data.py for JSON-to-chart-format conversion
  • Utility functions: sort-data, top-n, aggregate, percent-of-total
  • page-grid layout helper for multi-chart pages
  • Improved funnel, bubble, treemap, sunburst, and pie label rendering
  • Waffle right-side legend, bullet axis labels, sunburst background pills

0.2.0 — Major architecture overhaul, theme system, 11 new chart types

  • 11 new chart types: waffle, bump, dumbbell, radial-bar, sunburst, metric-card, violin, timeline, parliament, chord, word-cloud (bringing total to 50+)
  • multi-bubble-chart: multi-series bubble plot
  • with-theme(): document-wide theme defaults via show rule or block wrapper
  • Spiral word cloud: Wordle-style placement with collision detection + shape masks (circle, diamond, triangle)
  • Refactored theme system: override dicts, simplified presets, 6 named themes
  • Shared primitives extraction: cartesian-layout(), draw-legend-auto(), polar primitives, layout utilities (density-skip, font-for-space)
  • cartesian-layout() helper: migrated 18 chart functions to consistent axis padding
  • draw-legend-auto(): consolidated legend routing across 12 charts
  • Extracted polar primitives: shared module for 6 radial chart types
  • Label alignment overhaul: replaced hardcoded offsets with Typst alignment primitives across all charts
  • 19 per-chart demos for easy reference
  • Modularized test suite: 17 focused test modules
  • 30+ visual bug fixes: legend clipping, axis overlap, dark-theme contrast, Y-tick positioning, histogram box clipping, diverging/correlation/bump/gantt axis labels, funnel label overflow, calendar-heatmap empty-day borders
  • Container polish: background padding, title margins, dark-theme contrast
  • README improvements: package imports, language-tagged code blocks, with-theme() docs
  • Optimized screenshot PNGs (1.8MB → 700K)

Checklist

  • Package compiles with typst compile
  • typst.toml uses compiler field (>= 0.12.0)
  • MIT license included
  • No external dependencies
  • README has language-tagged code blocks
  • Screenshots, examples, tests, and data excluded from download via exclude

Repository

https://github.com/phiat/primaviz

@phiat phiat temporarily deployed to Package Check March 5, 2026 05:07 — with GitHub Actions Inactive
@typst-package-check typst-package-check bot added the update A package update. label Mar 5, 2026
Patch release — updated screenshots and version references.
No code changes from 0.4.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@phiat phiat temporarily deployed to Package Check March 5, 2026 05:23 — with GitHub Actions Inactive
@phiat phiat changed the title primaviz:0.4.0 primaviz:0.4.1 Mar 5, 2026
@saecki saecki self-assigned this Mar 5, 2026
Copy link
Copy Markdown
Member

@saecki saecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update

Include screenshots referenced by README, example source files,
and JSON data files. Update typst.toml exclude list accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@phiat phiat temporarily deployed to Package Check March 5, 2026 13:33 — with GitHub Actions Inactive
Replace relative imports (#import "../../src/lib.typ") with
package imports (#import "@preview/primaviz:0.4.1") to satisfy
registry checks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@phiat phiat temporarily deployed to Package Check March 5, 2026 13:35 — with GitHub Actions Inactive
@saecki
Copy link
Copy Markdown
Member

saecki commented Mar 5, 2026

Thanks!

@saecki saecki merged commit b6088e1 into typst:main Mar 5, 2026
3 checks passed
leostudiooo pushed a commit to leostudiooo/packages that referenced this pull request Mar 19, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
retroflexivity pushed a commit to retroflexivity/typst-packages that referenced this pull request Mar 19, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

update A package update.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants