Dynts comes with a fully fledged jQuery plugin for manipulating timeseries and scatter plots directly on the browser. The plugin is located on the media/dynts/ecoplot directory.
There are two dependencies:
The scripts to include are the followings:
<script type="text/javascript" src=".../dynts/flot/excanvas.min.js"></script>
<script type="text/javascript" src=".../dynts/flot/jquery.flot.min.js"></script>
<script type="text/javascript" src=".../dynts/flot/jquery.flot.selection.min.js"></script>
<script type="text/javascript" src=".../dynts/ecoplot/ecoplot.js"></script>
Lets say we have a tag in the HTML we want the plugin to be rendered. It is as easy as this:
<div id="plot"></div>
var eco = $('#plot').ecoplot(options);
where options is an objects containing parameters for the plugin.
Default: "econometric-plot"
Css class name to add to plugins div elements.
Version string.
Add a custom event to the plugin. Check the events documentation for further information.
Arguments: |
|
---|
Render the plugin.
Opposite to $.ecoplot.addEvent(), it removes an event from the registry.
Arguments: |
|
---|
The toolbar is an array of toolbar items:
var toolbar = [item1,...,itemN];
where a toolbar items is an object, for example:
item = {
classname: 'zoomout',
title: "Zoom Out",
icon: "ui-icon-zoomout",
decorate: function(b,el) {...}
}
Registering events with the plugin is also fully supported:
$.ecoplot.addEvent(event_handler);
where event_handler is an object with the following properties:
event_handler = {
id: "unique_string_id",
register: function(el) {
...
}
}
where el is the jQuery element holding the plugin. The register function implements the event handling on the el element. By default there are four registered events:
Here we describe the internal functions which are not exposed via the API.
called during initalization, it binds all events registered with addEvent API function with the ecoplot element.
Called after new data arrives, it updates the current canvases or create new ones. :param object $this: jQuery object holding the plugin :param object $this: list of flot-type objects containg data and plotting options.
Create a flot canvas for a plugin.
for creating editing panels