Clojure wrapper around XChart, a small library for rendering charts/plots.

Maintenance fork of hyPiRion/clj-xchart, ported to XChart 4.x / Clojure 1.12 and published to Clojars as
net.clojars.savya/clj-xchart.
clj-xchart wraps all the different charts you can generate in XChart:
Leiningen/Boot:
[net.clojars.savya/clj-xchart "0.3.5"]
deps.edn:
net.clojars.savya/clj-xchart {:mvn/version "0.3.5"}
There are a lot of examples on the examples page, and the tutorial covers basic usage. For more advanced customisation, have a look at the render options page.
(require '[com.hypirion.clj-xchart :as c])
(-> (c/xy-chart {"y = x" {:x [1 2 3] :y [1 2 3]}
"y = 2x" {:x [1 2 3] :y [2 4 6]}})
(c/spit "chart.png"))
The Clojure namespace is still com.hypirion.clj-xchart, so existing require
forms keep working; only the Clojars coordinate changed.
XChart 4.x reorganised its API (the vector-graphics export, the styler
hierarchy, and the pie "annotations" which are now "labels"). This fork tracks
those changes while keeping clj-xchart's own keyword-based API unchanged, so
charts written against earlier com.hypirion/clj-xchart releases keep
rendering. See CHANGELOG.md for details.
Copyright © 2016 Jean Niklas L'orange.
Maintenance fork (2026) by Savyasachi, original: https://github.com/hyPiRion/clj-xchart. Distributed under the Eclipse Public License 1.0, preserving the original license.
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Can you improve this documentation? These fine people already did:
Savyasachi & Jean Niklas L'orangeEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |