Archive for May, 2006

Things Are Interesting

Wednesday, May 31st, 2006

I’ve been lazy.

With renewed vigor I accidentally attacked the final rough spot that had been nagging me in Clicker: multiple renderers in the same chart. The fruits of my labor can only be described as savory.

This required reviving the long-dead Plot class with a new purpose, handling the mapping of datasets to renderers as well as calling each renderer successively.

Now I need to ascertain why multiple-axes is not working. Then we are cooking with gas.

Update: Nevermind, multiple-axes almost works fine:

Just need to fix that blurry line and add some padding to the values.

Further Refinements

Tuesday, May 23rd, 2006

There are some bugs in my current release that are I didn’t notice. While I was fixing them I prettied things up.

Compare to the image below. There was a bug in Axis packing and I also modified the Grid to snap to the proper places for nice, clear lines. Early support for margins, at least for the Legend, were added as well. Too tired to bother with a release tomorrow. Maybe tomorrow night.

The Milestone Nears: 0.9.5

Monday, May 22nd, 2006

The corners are sharp and unsightly but the ideas are all intact.

Labels are now working properly. There is some paperwork to do before 1.0, but it’s downhill from here.

0.9.5

More Layout Work

Wednesday, May 17th, 2006

Axes are now behaving properly. The solution was a bit more involved that I had anticipated but it does work.

Of note are the 4 Legends that have been added. They are rendering as either Horizontal or Vertical and you can add them all over the chart if you want. Everything just works. Well, almost everything. Two axes works well but if you try and add more than that things get out of hand. I’ll fix it soon.

The Lay Of The Land

Monday, May 15th, 2006

Layout based rendering works (for the most part).

Rather than have a central ‘Plot’ class that new how to draw a legend, axes, and a rendering area there is now a generic Container (which inherits from Component) that can have components added to it:


my $chart = new Chart::Clicker;
$chart->datasets(...);
$chart->add(new Legend(), $CC_TOP);
$daxis = new Chart::Clicker::Axis();
$raxis = new Chart::Clicker::Axis();
$chart->domain_axes([ $daxis ]);
$chart->range_axes([ $raxis ]);
$chart->add($daxis, $CC_BOTTOM);
$chart->add($raxis, $CC_LEFT);
my $renderer = new Chart:Clicker::Renderer::Area();
$chart->add($renderer, $CC_CENTER);

I’ve not tested it with anything obtuse yet and I have no clue how to get the domain axis to not take up the full width. There’s a chicken and egg problem there. But that can be fixed. I’m quite pleased that this idea worked out. I am now much happier about the way Clicker works. It was a lot of work.

I hope to release a new, better documented version tomorrow or the next day. All the POD has been touched up. The main document will need to be updated to reflect the new methods. Then I’ll need to work out a Factory interface so that users need not be concerned with the gritty details of layout.

0.9.1 – Epiphaniferous

Wednesday, May 10th, 2006

0.9.1 is very minor. A few fixes were made to the POD so that Clicker’s CPAN entry isn’t so scarily useless. The Component and Container make their debut. The Clicker class has been converted to inherit from container and other things will fall in the days to come.

chart-clicker-0.9.1

The eventual idea is to give Clicker something like BorderLayout from Java so that it can position Components within a Container. This will eliminate a lot of the error prone, boring code that was such a pain to write for Axis support.

Clicker Is On Trac With Version 0.9.0

Tuesday, May 9th, 2006

From version 0.2.4 to 0.9.0. That’s almost Sun-esque!

0.9.0 is a weighty release, with the Changes file seeing lots of action

chart-clicker-0.9.0

I have Trac now. I’ve become quite addicted to it at the office so having it for my side project makes the circle complete. You can use it to check out the Roadmap.

I’ve created a 1.0 milestone that details the features that need to be added before I’m ready to release the all important one point oh.

More Axis Work

Monday, May 8th, 2006

The forthcoming 0.3.0 is shaping up to be the biggest yet. The introduction of Axis handling in C:C::Plot has been painful because it takes many calculations to allocate space for them.

Got Axes?

Axes can switch sides and still render properly. Theoretically they should also render properly if there is one on each side (left and right for range, top and bottom for domain) or even multiple on the same side. I’ve yet to test that theoretical case but I think it will work.

Adding labels to the axis code and colored shapes to the legend will round out the features I’ve roadmapped. Then I will settle in and reread all the code and fix all the crappy code I can find. It generally takes me two tries to be happy with a new feature’s implementation.

Things Are Shaping Up: 0.2.4

Friday, May 5th, 2006

The legend needs cute little boxes to denote the color of the series, so I need some Shapes! 0.2.4 is now available with an Arc and Rectangle.

Squares and Circles!

The Point renderer now uses a default Arc shape for it’s ‘points’. This can be overriden, of course. Shapes know how to create their own paths, so users can create their own shapes by implementing:
sub create_path($cairo, $x, $y)

The render will handle any stroking or filling on return.

The above example of different shapes for each series was actually a hack as I’ve yet to decide how exactly to expose that functionality.

Version 0.2.3 Released

Wednesday, May 3rd, 2006

To celebrate the debut of the new site, version 0.2.3 is being released into the wild.

This release features legends, which aren’t quite finished but are rendering pixel perfect for HORIZONTAL mode. VERTICAL needs a little work work.

Check out the examples and the documentation. The latter needs some work, but it’s a start.