chart-unit: Native haskell charts.

[ bsd3, charts, library ] [ Propose Tags ]

chart-unit is a native haskell charting library designed:

See chart-unit for a chart gallery.


[Skip to Readme]
Versions 0.1.0.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5.0, 0.6.0.0, 0.6.0.1, 0.6.0.2, 0.6.1.0, 0.6.2.0, 0.6.3.0, 0.7.0.0
Dependencies base (>=4.7 && <5), chart-unit, colour, containers, data-default, diagrams-lib, diagrams-rasterific, diagrams-svg, foldl, formatting, lens, linear, mwc-probability, mwc-random, numhask (>=0.0.5 && <1), numhask-range (>=0.0.3 && <1), palette, primitive, protolude, SVGFonts, tdigest, text [details]
License BSD-3-Clause
Copyright 2016 Tony Day
Author Tony Day
Maintainer tonyday567@gmail.com
Category charts
Home page https://github.com/tonyday567/chart-unit
Source repo head: git clone https://github.com/tonyday567/chart-unit
Uploaded by tonyday567 at Wed Sep 6 20:51:02 UTC 2017
Distributions LTSHaskell:0.7.0.0, NixOS:0.7.0.0
Executables chart-source-examples
Downloads 2856 total (59 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-09-06 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for chart-unit-0.5.2

[back to package description]

chart-unit

Build Status Hackage lts nightly

chart-unit is a haskell chart library focusing on a small set of high-quality charts using native haskell. Here's a recent example, chock-a-block full of titles and legends (that needed testing):

Chart Types

So far, there are 8 major chart types:

Why the name chart-unit?

Most of the behind-the-scenes grunt work is scaling data, projecting points from one range to another, and computing position. A key to making these computations neat was one = Range -0.5 0.5 and one = Rect -0.5 0.5 -0.5 0.5 as the (multiplicative) units of a chart range. See numhask-range for a monologue.

What's with the funny names?

Charting is an age-old craft, and stuffed to the brim with cliche and jargon. I wanted to cut through the cruft of what is thought of as a chart (and charting has been dominated by excel for 30 years), and approach charting from a haskelly perspective. The funny names were the cohorts that popped out. A rough translation:

| ye-old Chart type | chart-unit type | |------------------------------------------------------|-----------------------| | line | LineChart | | line chart with markers | GLineChart | | scatter | GlyphChart | | pie | pull requests welcome | | heatmap | PixelChart | | Bar | RectChart | | Histogram | RectChart | | sparkline | a skinny Aspect | | | |

Gallery

The main chart types and the power of diagrams make it easy to invent new charts. Hrere's some inspiration (all code for these charts is in examples/sourceExamples.hs).

schoolbook

labelled bar

histogram diff

combined scatter histogram

clipping

skinny

animation

workflow

stack build --test --exec "$(stack path --local-install-root)/bin/chart-source-examples" --exec "$(stack path --local-bin)/pandoc -f markdown -i other/header.md readme.md other/footer.md -t html -o index.html --filter pandoc-include --mathjax" --file-watch