It’s been awhile since I posted any updates on adw-charting, but some progress has been made. After deciding to use google charts for rendering, a few months ago, I’m re-thinking the decision. Google charts look very nice, but they weren’t as automatic as I’d hoped, and there was still a lot of processing needed before it could display a reasonable chart either. Using google is certainly less CPU/memory intensive than using vecto, but there are a few problems:
- charts are limited to 300,000 pixels, which is smaller than it sounds
- because all the data needs to be passed on a URL, it chokes on large datasets. This can be helped by using alternate encodings for values, but that looks like a pain in the ass (basically have to map the arbitrary lisp data evenly onto 0-64 or 0-4096, then encode as ASCII, I predict rounding troubles)
- it doesn’t automatically scale to fit your size. For example, a bar chart uses 20px wide bars by default. If you have too many bars they just wander off the right of the canvas, and you need to manually adjust the bar width to get things to fit
- some of the labels / titles get cut off
The google backend certainly has it’s uses, but I’m going to revive the vecto backend, which gives complete control. As a start, I’ve split the project into a 3 asdf systems:
- adw-charting: has some utils and common code, declares the :adw-charting package
- adw-charting-vecto: adds/exports functions for making vecto charts in the :adw-charting package
- adw-charting-google: adds/exports functions for making google chart URLs into in the :adw-charting package
In this setup, you’ll load adw-charting-google.asd or adw-charting-vecto.asd, and then all the dependancies will sort themselves out, and you don’t have anything loaded you don’t need.
I looked at asdf-system-connections but didn’t see how it would help, so copied cl-xmpp‘s multiple asd file scheme. This is currently just in the darcs repo, and may have some bugs.
I’ve also started an actual adw-charting todo list, as part of a greater effort to be more organized in my life, comments welcome here.