Skip to content
This repository was archived by the owner on Oct 7, 2022. It is now read-only.
cederberg edited this page Sep 14, 2010 · 9 revisions

PlotKit is a JavaScript charting library using SVG or Canvas. It supports all major browsers. See the full documentation or project page for more information.

This web site contains a number of add-on patches and fixes for PlotKit (awaiting inclusion in the ordinary release):

Support for “point” chart layout

A new Layout type “point” has been added (currently only to the Canvas renderers). It takes the same options as the “line” layout, but only prints the actual data points instead of lines between them:

var layout = new PlotKit.Layout("point");

Support for tooltips on xTicks and yTicks labels

Sometimes, the labels in a chart are too long to print out fully. There is now support in the xTicks and yTicks options to add a new tooltip property. This value will be added as a tooltip (using an HTML title attribute or similar) to the specified tick label.

var ticks = [{ label: "short", tooltip: "long text in tooltip", v: 1 }];
var opts = { xTicks: ticks };
var layout = new PlotKit.Layout("pie", opts);

Support for actual values in pie chart labels

Pie chart labels can now be rendered with either the percentage (default), the actual value or no value at all.

var layout = new PlotKit.Layout("pie", { "pieValue": "percent" });
// or
var layout = new PlotKit.Layout("pie", { "pieValue": "value" });
// or
var layout = new PlotKit.Layout("pie", { "pieValue": "none" });

Missing MochiKit.{Base,DOM,Style} function prefixes

A number of MochiKit function calls in PlotKit were missing their prefixes, depending on an exported version of MochiKit (which is bad for a library).