library for drawing charts

Hello, Has anyone got some code for drawing charts? I don't mean graphs of functions, ala http://dockerz.net/twd/HaskellCharts and I don't mean calls to the Google Charts API ala http://community.livejournal.com/evan_tech/241080.html I would like something that can generate PNGs in memory, i.e. not directly to a file. This is close to what I have in mind: http://www.fred.net/brv/chart/ I'd like 2D pie charts, bar charts and something like a google-o-meter. Any pointers? cheers peter

On Sat, May 24, 2008 at 5:33 AM, Peter Gammie
Hello,
Has anyone got some code for drawing charts?
Look at this: http://byorgey.wordpress.com/2008/04/30/new-haskell-diagrams-library/ I'm not sure it's what you're looking for but it could probably be used as a base for drawing charts. Brent Yorgey announced version 0.1 on the list a few weeks ago. Regards, Olivier.

Peter wrote:
Has anyone got some code for drawing charts? I don't mean graphs of functions, ala
http://dockerz.net/twd/HaskellCharts ... I would like something that can generate PNGs in memory, i.e. not directly to a file.
The library at the above URL supports a range of backends through the (nice to use) cairo graphics API. In memory images are supported. Also, it's by no means just graphs of functions - that just happens to be several of the demos.
I'd like 2D pie charts, bar charts and something like a google-o-meter.
An the moment it does line charts and a few variants of these. I'll add pie and bar charts when I need them - patches in the meantime gratefully accepted. Tim

Tim Docker wrote:
Peter wrote:
Has anyone got some code for drawing charts? I don't mean graphs of functions, ala
http://dockerz.net/twd/HaskellCharts ... I would like something that can generate PNGs in memory, i.e. not directly to a file.
The library at the above URL supports a range of backends through the (nice to use) cairo graphics API. In memory images are supported. Also, it's by no means just graphs of functions - that just happens to be several of the demos.
I'd like 2D pie charts, bar charts and something like a google-o-meter.
An the moment it does line charts and a few variants of these. I'll add pie and bar charts when I need them - patches in the meantime gratefully accepted.
Tim
I was using the HaskellCharts library and needed the same two things; so i rolled a quick and dirty pie chart generator (Barchart is on the TODO list). http://72.167.145.184:8000/Screenshot.png http://72.167.145.184:8000/PieChart.hs ---- x <- widgetGetDrawWindow canvas y <- widgetGetSize canvas renderWithDrawable x (f y) where f = PieChart.graph "title" 0x548B54 [(50.0,"A"), (50.0,"B")]

Neal Alexander wrote:
I was using the HaskellCharts library and needed the same two things; so i rolled a quick and dirty pie chart generator (Barchart is on the TODO list).
http://72.167.145.184:8000/Screenshot.png http://72.167.145.184:8000/PieChart.hs
Nice! Do you mind if I refactor that a bit and add it to the HaskellCharts library? The license is BSD. Tim

Tim Docker wrote:
Neal Alexander wrote:
I was using the HaskellCharts library and needed the same two things; so i rolled a quick and dirty pie chart generator (Barchart is on the TODO list).
http://72.167.145.184:8000/Screenshot.png http://72.167.145.184:8000/PieChart.hs
Nice! Do you mind if I refactor that a bit and add it to the HaskellCharts library? The license is BSD.
Tim
Yea whatever is cool, it needs some tweaks no doubt.
participants (4)
-
Neal Alexander
-
Olivier Boudry
-
Peter Gammie
-
Tim Docker