[Seaside] [ANN] PlotKit 0.8 for Seaside

Philippe Marschall philippe.marschall at gmail.com
Tue Apr 25 19:25:45 UTC 2006


> I really like the new charts, but am struggling a bit to figure out how
> the labels for the PlotKit pie charts work. Seeing that there is not an
> xTicks: accessor for the pie chart layout, one would assume that the
> labels can be set in the dataset. But using a dataset like the one below
> cause's nothing to be displayed, while passing numeric labels seems to
> work fine.
> dataset := PKDataset new
>         name: 'data1';
>         addX: 'A' y: 1;
>         addX: 'B' y: 2;
>         addX: 'C' y: 3;
>         addX: 'D' y: 4;
>         yourself

You are right, #xTicks: would do the trick, but it's not there. The
reason I didn't put it in the pie layout options is that the
documentation says it's only available on line and bar layouts.
As it turns out, the documentation is wrong and it works fine with a pie layout.

I published a new version (PlotKit-pmm.4) that adds #xTicks: to all
layout options, and updated the included demo to set the labels. I
also included a patch from the PlotKit mailinglist that allows to
disable filling and stroking for line charts.

A dataset is really just a collection of points and a string. If you
don't find the API a paragon of OOP then I agree. It's just a very
close mapping of the existing PlotKit API. This makes life for me much

If nothing is displayed this in general means that there was a
JavaScript exception. Firefox and Extensions (Javascript Console,
FireBug, Javascript Debugger) help in these cases.


More information about the Seaside mailing list