Haskell Charts

A library for rendering 2D charts from haskell.

Features

Recent News

29 Apr 2013

After many years as a satisfied user of darcs, I've decided it's time to migrate the project to github. Sometimes mainstream acceptance is more important than personal preference. The official source repository for chart is now at https://github.com/timbod7/haskell-chart.

15 Dec 2011

Due to problems with google groups, the mailing list has a new home at http://projects.haskell.org/cgi-bin/mailman/listinfo/chart.

27 Oct 2010

Quite a few patches from others, and several of my own, make up the new v0.14. See /ReleaseNotes014 for the release announcement.

27 May 1010

I just uploaded v0.13.1 to hackage. This is a minor update, with some changes to suit the new gtk2hs release. Finally gtk2hs is cabalised - congratulations to the gtk2hs team for this significant step forward. Now installing gtk2hs+chart should be as simple as:

    cabal update
    cabal install gtk2hs-buildtools
    cabal install gtk
    cabal install chart

18 April 2010

Edward Z. Yang has written a blog post about the data accessor library, used by chart to make haskell records a little more user friendly. This might be useful background for new users who haven't seen this package before.

31 Mar 2010

V0.13 has been set loose. This time around, new stuff includes:

/OldNews

Examples

Simple API

The "simple" API is straightforward to use directly from the ghci REPL. For example:

$ ghci -package Chart-gtk
...
Prelude> :m Graphics.Rendering.Chart.Gtk.Simple
Prelude Graphics.Rendering.Chart.Gtk.Simple> plotWindow [0,0.1..2.9] sin

will produce a chart in a window:

HaskellCharts/Example0

Standard API

(Click on the example to enlarge and view its haskell source)

HaskellCharts/Example1 HaskellCharts/Example2
HaskellCharts/Example3 HaskellCharts/Example6
HaskellCharts/Example8 HaskellCharts/Example9
HaskellCharts/TestParametric HaskellCharts/Example14a
HaskellCharts/Example17

Documentation

The documentation automatically generated by haddock is available from hackage.

To-Do

Dependents

There's some nice software that makes use of this library. Follow the links to some applications:

Dependencies

1) Cairo interface for haskell. This is presently only available within the gtk2hs library. Now that gtk2hs is built using cabal, this is much easier than it was. However, some tweaks may still be required for your platform. See the gtk2hs home page for details.

2) All of the other dependencies cabal can sort out for you. They currently are:

time, mtl, array, data-accessor == 0.2.*, data-accessor-template >= 0.2.1.1 && < 0.3, colour >= 2.2.1

Download

via git, with the command: git clone https://github.com/timbod7/haskell-chart or get the stable version from hackage.

To build

Get gtk2hs up and running for you platform first. Then it should be as simple as:

cabal update
cabal install chart-gtk

This installs the library. The test cases are in the downloaded package, but not installed or built by the above command. So if you want check they work and look at them as examples, you'll need to do this manually:

tar -xzf ~/.cabal/packages/hackage.haskell.org/Chart/0.13/Chart-0.13.1.tar.gz
cd Chart-0.13.1/tests
runghc all_tests.hs

Credits

Thanks to following for contributing patches:

Contact

Mailing List : http://projects.haskell.org/cgi-bin/mailman/listinfo/chart

or Tim Docker:

Patches welcome!

HaskellCharts (last edited 2013-04-28 21:27:46 by TimDocker)