| Subcribe via RSS

Perl Module Monday: Chart::Clicker

November 23rd, 2009 Posted in CPAN, Perl

I’ve been interested in the Chart::Clicker package for a while, and today it came up in a series of Twitter messages in my #perl search. So that seemed like a sign that it would be a good pick for this week’s feature.

Chart::Clicker is a mature, very feature-rich charting package that comes with a cookbook and many examples (the code for the examples is available on GitHub). There’s also a tutorial POD in the distribution. It does pie charts, line graphs, bar graphs, area graphs, stacked bar or area or line graphs,  points, bubbles, or candlestick-style charts. In short, it makes pretty pictures in Perl:


area.png, from the Examples page

The above is just one of the images shown as examples of what Chart::Clicker can do.

The module bases its rendering on Graphics::Primitive, specifically Graphics::Primitive::Driver::Cairo. This means it can render the chart in any format Cairo supports; PNG, PDF, even SVG among others. The internal object-model is based on Moose, which leads to keeping potentially-duplicate code to a minimum. Using the package is about as complex as you need your graph to be: a simple graph with a single set of data can be created in just 5 lines of code or so, while some of the examples are much more complicated scripts.

I’m surprised to see (according to CPANTS) that this module is not a component in any other packages’ lists of dependencies. It would seem to me to be a logical bit of functionality to integrate into a Catalyst view, or any stats package. I won’t be surprised if this changes in the near future, as (hopefully) more people start using the package.

3 Responses to “Perl Module Monday: Chart::Clicker”

  1. Dave DoyleNo Gravatar Says:

    Wow. You know what, that’s just gorgeous. Thanks for posting about this. Hopefully I can add this to a project in the near future.

  2. Dereferenced.com » Blog Archive » Perl Module Monday: Chart::Clicker Scripts Rss Says:

    […] original post here: Dereferenced.com » Blog Archive » Perl Module Monday: Chart::Clicker By admin | category: perl scripts, scripts | tags: are-much, examples, graph, […]

  3. Article SubmissionNo Gravatar Says:

    Hello, just thought you’d be interested to know that I have saved your blog to my Google bookmarks because of your great blog layout (LOL). With that said, seriously, I believe your blog has one of the cleanest theme I’ve came across. It honestly helps make reading your blog a lot easier.

Leave a Reply