-
Notifications
You must be signed in to change notification settings - Fork 2
Home
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):
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");
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);
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" });
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).