Re: [Haskell-cafe] library for drawing charts

Tim, Thanks for the pointer. Just to clarify: On 26/05/2008, at 9:09 AM, Tim Docker wrote:
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.
So the library itself supports drawing these other types of charts? Can you steer me towards some sample outputs? One thing I was most unhappy to discover was the lack of Unicode support in Google charts. Another is the lack of control over some colours (the arrow in the google-o-meter, e.g.) and labelling. When one wants to build an accessible website, these things end up breaking the deal. BTW Bjorn has written a binding to libgd. Does Cairo have similar functionality, e.g. quizzing an image file for geometry info? cheers peter

On 28/05/2008, at 3:16 AM, Peter Gammie wrote:
So the library itself supports drawing these other types of charts? Can you steer me towards some sample outputs?
I'm not sure what you mean here. There's three libraries involved there: - the charts library - this currently draws line/point plots etc (samples as shown on the web page) - the cairo library - this is a general purpose 2D drawing API - the gtkhs library - used if you want to show images drawn with cairo directly to the screen At present there's no code for bar and pie charts.
BTW Bjorn has written a binding to libgd. Does Cairo have similar functionality, e.g. quizzing an image file for geometry info?
I don't know much about libgd, but having just read a description of it: "GD is an open source code library for the dynamic creation of images by programmers. GD creates PNG, JPEG and GIF images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve web site development." it sounds like it overlaps with cairo a fair bit. Cairo has backends for vector as well as raster formats, however, and also supports hardware acceleration. Tim

On 28/05/2008, at 9:09 PM, Tim Docker wrote:
On 28/05/2008, at 3:16 AM, Peter Gammie wrote:
So the library itself supports drawing these other types of charts? Can you steer me towards some sample outputs?
I'm not sure what you mean here. There's three libraries involved there:
- the charts library - this currently draws line/point plots etc (samples as shown on the web page) - the cairo library - this is a general purpose 2D drawing API - the gtkhs library - used if you want to show images drawn with cairo directly to the screen
Argh, that was badly put. By "the library" I meant Cairo. I'd call what you've done a "Haskell binding" except you've added some functionality beyond what the C library provides. I thought that Cairo might have a friendly chart library that you have provided some bindings for, ala the one for GD I pointed to earlier. Thanks, I'll put it on the never-shrinking to do. cheers peter -- http://peteg.org/
participants (2)
-
Peter Gammie
-
Tim Docker