[Haskell-cafe] Re: library for drawing charts

2008-06-05 Thread Neal Alexander

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.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: library for drawing charts

2008-06-04 Thread Neal Alexander

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)]

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: library for drawing charts

2008-06-04 Thread Tim Docker
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


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe