Slider Position: Pos: Loc:
Accordion Position: Center: Width:

Plugins

SigPlot can be extended to provide new capabilities using the plugin mechanism. Plugins can draw on the plot, they can add to the menu, and they can interact with mouse events. SigPlot comes with some standard plugins in the sigplot.plugins.js file, but you many contribute others. To load the standard plugins:


<script src="../sigplot.plugins.js"></script>
	        

Currently the standard plugins include:

The annotation plugin behaves similar to the original SigPlot annotation mechanism. SigPlot annotations have two unique features:

The slider plugin creates a horizontal or vertical bar that can be used to display the current position in the file. It also provides the ability for the user to "grab" the bar and slide it .. go ahead, give it a try.

A SigPlot plugin can be any JavaScript object, all methods are optional but here is a common plugin


MyPlugin = function(options) { // Contructor };

MyPlugin.prototype = {
    init: function(plot) { // Called when the plugin is added to a plot }
    dispose: function(plot) { // Called when removed from a plot }
    refresh: function(plot { // Called when the plugin needs to redraw }
    menu: // either an mx.menu compatible object or a function that returns one
};