Tangelo JavaScript API

The Tangelo clientside library (tangelo.js) contains many functions to help create rich web applications for performing visualization and other tasks. The library is conceptually split up into several sections, reviewed here.

Core Services

The core functions represent basic support for creating web applications.

tangelo.version()

Returns a string representing Tangelo’s current version number. See A Note on Version Numbers for more information on Tangelo version numbers.

Return type:string
tangelo.fatalError([module, ]msg)

Throws a JavaScript error containing a message, and optionally the name of the reporting module. For example, the call tangelo.fatalError("mymodule", "You can't divide by zero!"); produces a JavaScript Error exception with the message [mymodule] You can’t divide by zero!

Arguments:
  • module (string) – reporting module name
  • msg (string) – message to report in exception
tangelo.unavailable(cfg)

Returns a function that raises a fatal error telling the user about missing JavaScript requirements needed to run some functionality.

Generally, when it is detected that the requirements for some function are incomplete, the function can be implemented with tangelo.unavailable() in order to produce a useful error message at runtime.

Example:

if (!foobar) {
    coolLib.awesomeFeature = tangelo.unavailable({
        plugin: "coolLib.awesomeFeature",
        required: "foobar"
    });
}

Note that the cfg.required may also be a list of strings, if there are multiple requirements.

Arguments:
  • cfg.plugin (string) – The functionality with missing requirements
  • cfg.required (string or list of string) – The requirement(s)
tangelo.requireCompatibleVersion(requiredVersion)

Determines if requiredVersion represents a Tangelo version that is compatible with the current version. The notion of compatibility comes from Tangelo’s semantic versioning (see A Note on Version Numbers for more information) and works as follows:

Development versions are compatible if all components match. That is to say, the major and minor versions, the patchlevel (if any), and the tag text must all match.

Unstable versions (those with major version 0) are compatible if the major version numbers are both 0 and the minor version numbers match.

Release versions (those with major version greater than zero) are compatible if the major version numbers match, and the required version’s minor version number is at most to Tangelo’s minor version number. In case the minor version numbers are equal, the required patchlevel must be at most equal to Tangelo’s patchlevel as well.

These rules ensure that the required API is the same as the API exported by Tangelo.

Arguments:
  • requiredVersion (string) – The version required by the calling application
Return type:

boolean

Utilities

The utility functions provide services that may be useful or convenient in many kinds of web applications.

tangelo.config(webpath, callback)

Loads the JSON file found at webpath asynchronously, then invokes callback, passing the JSON data, a status flag, and any error string that may have occurred, when the content is ready.

This function can be used to perform static configuration of a deployed web application. For example, the JSON file might list databases where application data is stored.

Arguments:
  • webpath (string) – A webpath referring to a JSON configuration file - relative paths will be resolved with respect to the current web location
  • callback (function(data,status,error)) – A callback used to access the configuration data once it is loaded. status reads either OK if everything is well, or could not open file if, e.g., the file is missing. This may occur if, for example, the configuration file is optional. If there is an ajax error, it will be passed in the error parameter.
tangelo.uniqueID(n)

Generates a identifier made up of n randomly chosen lower and upper case letters, guaranteed to be unique during the run of a single web application.

This function can be useful when designing plugins that create DOM elements that need to be referenced in a reliable way later. The unique identifiers that come from this function can be used in the id attribute of such elements.

Be careful about calling this function with a small n - for example, a sequence of 52 calls to tangelo.uniqueID(1) would take longer and longer to randomly generate each single-letter string, while the 53rd call would enter an infinite loop. This is an extremely unlikely scenario but it bears to keep it in mind.

Arguments:
  • n (integer) – The length of the desired identifier
Return type:

string

tangelo.queryArguments()

Returns an object whose key-value pairs are the query arguments passed to the current web page.

This function may be useful to customize page content based on query arguments, or for restoring state based on configuration options, etc.

Return type:object
tangelo.isNumber(value)

Returns true is value is a number and false otherwise.

Arguments:
  • value – The value to test
Return type:

boolean

tangelo.isBoolean(value)

Returns true is value is a boolean and false otherwise.

Arguments:
  • value – The value to test
Return type:

boolean

tangelo.isArray(value)

Returns true is value is an array and false otherwise.

Arguments:
  • value – The value to test
Return type:

boolean

tangelo.isObject(value)

Returns true is value is an object and false otherwise.

Arguments:
  • value – The value to test
Return type:

boolean

tangelo.isString(value)

Returns true is value is a string and false otherwise.

Arguments:
  • value – The value to test
Return type:

boolean

tangelo.isFunction(value)

Returns true is value is a function and false otherwise.

Arguments:
  • value – The value to test
Return type:

boolean

tangelo.absoluteUrl(webpath)

Computes an absolute web path for webpath based on the current location. If webpath is already an absolute path, it is returned unchanged; if relative, the return value has the appropriate prefix computed and prepended.

Arguments:
  • webpath (string) – an absolute or relative web path
Return type:

string

tangelo.accessor([spec])

Returns an accessor function that behaves according to the accessor specification spec. Accessor functions generally take as input a JavaScript object, and return some value that may or may not be related to that object. For instance, tangelo.accessor({field: "mass"}) returns a function equivalent to:

function (d) {
    return d.mass;
}

while tangelo.accessor({value: 47}) return a constant function that returns 47, regardless of its input.

As a special case, if spec is missing, or equal to the empty object {}, then the return value is the undefined accessor, which simply raises a fatal error when called.

For more information of the semantics of the spec argument, see Accessor Specifications.

Data Transformation

These functions, in the tangelo.data namespace, provide transformations of common data formats into a common format usable by Tangelo plugins.

tangelo.data.tree(spec)

Converts an array of nodes with ids and child lists into a nested tree structure. The nested tree format with a standard children attribute is the required format for other Tangelo functions such as $.dendrogram().

As an example, evaluating:

var tree = tangelo.data.tree({
    data: [
        {name: "a", childNodes: [{child: "b", child: "c"}]},
        {name: "b", childNodes: [{child: "d"}]},
        {name: "c"},
        {name: "d"}
    ],
    id: {field: "name"},
    idChild: {field: "child"},
    children: {field: "childNodes"}
});

will return the following nested tree (note that the original childNodes attributes will also remain intact):

{
    name: "a",
    children: [
        {
            name: "b",
            children: [
                {
                    name: "d"
                }
            ]
        },
        {
            name: "c"
        }
    ]
}
Arguments:
  • spec.data (object) – The array of nodes.
  • spec.id (Accessor) – An accessor for the ID of each node in the tree.
  • spec.idChild (Accessor) – An accessor for the ID of the elements of the children array.
  • spec.children (Accessor) – An accessor to retrieve the array of children for a node.
tangelo.data.distanceCluster(spec)
Arguments:
  • spec.data (object) – The array of nodes.
  • spec.clusterDistance (number) – The radius of each cluster.
  • spec.x (Accessor) – An accessor to the \(x\)-coordinate of a node.
  • spec.y (Accessor) – An accessor to the \(y\)-coordinate of a node.
  • spec.metric (function) – A function that returns the distance between two nodes provided as arguments.

Groups an array of nodes together into clusters based on distance according to some metric. By default, the 2D Euclidean distance, \(d(a, b) = \sqrt{(a\mathord{.}x - b\mathord{.}x)^2 + (a\mathord{.}y - b\mathord{.}y)^2}\), will be used. One can override the accessors to the \(x\) and \(y\)-coordinates of the nodes via the spec object. The algorithm supports arbitrary topologies with the presence of a custom metric. If a custom metric is provided, the x/y accessors are ignored.

For each node, the algorithm searches for a cluster with a distance spec.clusterDistance. If such a cluster exists, the node is added otherwise a new cluster is created centered at the node. As implemented, it runs in \(\mathcal{O}(nN)\) time for \(n\) nodes and \(N\) clusters. If the cluster distance provided is negative, then the algorithm will be skipped and all nodes will be placed in their own cluster group.

The data array itself is mutated so that each node will contain a cluster property set to an array containing all nodes in the local cluster. For example, with clustering distance 5 the following data array

>>> data
[
    { x: 0, y: 0 },
    { x: 1, y: 0 },
    { x: 10, y: 0 }
]

will become

>>> data
[
    { x: 0, y: 0, cluster: c1 },
    { x: 1, y: 0, cluster: c1 },
    { x: 10, y: 0, cluster: c2 }
]

with

>>> c1
[ data[0], data[1] ]
>>> c2
[ data[2] ]

In addition, the function returns an object with properties singlets and clusters containing an array of nodes in their own cluster and an array of all cluster with more than one node, respectively. As in the previous example,

>>> tangelo.data.distanceCluster( { data: data, clusterDistance: 5 } )
{
    singlets: [ data[2] ],
    clusters: [ [ data[0], data[1] ] ]
}
tangelo.data.smooth(spec)
Arguments:
  • spec.data (object) – An array of data objects.
  • spec.x (Accessor) – An accessor to the independent variable.
  • spec.y (Accessor) – An accessor to the dependent variable.
  • spec.set (function) – A function to set the dependent variable of a data object.
  • spec.kernel (string) – A string denoting a predefined kernel or a function computing a custom kernel.
  • spec.radius (number) – The radius of the convolution.
  • spec.absolute (bool) – Whether the radius is given in absolute coordinates or relative to the data extent.
  • spec.sorted (bool) – Whether the data is presorted by independent variable, if not the data will be sorted internally.
  • spec.normalize (bool) – Whether or not to normalize the kernel to 1.

Performs 1-D smoothing on a dataset by convolution with a kernel function. The mathematical operation performed is as follows:

\[\begin{split}y_i \leftarrow \sum_{\left|x_i - x_j\right|<R} K\left(x_i,x_j\right)y_j\end{split}\]

for \(R=\) spec.radius and \(K=\) spec.kernel. Predefined kernels can be specified as strings, these include:

  • box: simple moving average (default),
  • gaussian: gaussian with standard deviation spec.radius/3.

The function returns an array of numbers representing the smoothed dependent variables. In addition if spec.set was given, the input data object is modified as well. The set method is called after smoothing as follows:

set.call(data, y(data[i]), data[i], i),

and the kernel is called as:

kernel.call(data, x(data[i]), x(data[j]), i, j).

The default options called by

smooth({ data: data })

will perform a simple moving average of the data over a window that is of radius \(0.05\) times the data extent. A more advanced example

smooth({
    data: data,
    kernel: 'gaussian',
    radius: 3,
    absolute: true,
    sorted: false
})

will sort the input data and perform a gaussian smooth with standard deviation equal to \(1\).

Streaming API

The Streaming API allows for the handling of web services that yield parts of their output a piece at a time. This is useful for handling very large data streams, but could also be used for purposes such as informing a web application of different phases of its execution, etc. The streaming functions are found in the tangelo.stream namespace.

See Streaming for a full discussion on how streaming works.

tangelo.stream.streams(callback)

Asynchronously retrieves a JSON-encoded list of all stream keys, then invokes callback, passing the keys in as a JavaScript list of strings.

Arguments:
  • callback (function(keys)) – A callback taking one argument of type list of strings.
tangelo.stream.start(webpath, callback)

Asynchronously invokes the web service at webpath - which should initiate a stream by returning a Python iterable object from its run() method - then invokes callback, passing it the stream key associated with the new stream.

This callback might, for example, log the key with the application so that it can be used later, possibly via calls to tangelo.stream.query() or tangelo.stream.run():

tangelo.stream.start("myservice", function (key) {
    app.key = key;
});
Arguments:
  • webpath (string) – A relative or absolute web path, naming a stream-initiating web service
  • callback (function(key)) – A function to call when the key for the new stream becomes available
tangelo.stream.query(key, callback)

Runs the stream keyed by key for one step, then invokes callback with the result. If there is an error, callback is instead invoked passing undefined as the first argument, and the error as the second.

Arguments:
  • key (string) – The key for the desired stream
  • callback (function(data)) – The callback to invoke when results come back from the stream
tangelo.stream.run(key, callback[, delay=100])

Runs the stream keyed by key continuously until it runs out, or there is an error, invoking callback with the results each time. The delay parameter expresses in milliseconds the interval between when a callback returns, and when the stream is queried again.

The behavior of callback can influence the future behavior of this function. If callback returns a value, and the value is a

  • function, it will replace callback for the remainder of the stream queries;
  • boolean, it will stop running the stream if false;
  • number, it will become the new delay, beginning with the very next stream query.

Other return types will simply be ignored.

Arguments:
  • key (string) – The key for the stream to run
  • callback (function(data)) – The callback to pass stream data when it becomes available
  • delay (number) – The delay in milliseconds between the return from a callback invocation, and the next stream query
tangelo.stream.delete(key[, callback])

Deletes the stream keyed by key. The optional callback is a function that is invoked with an error object is something went wrong during the delete operation, or no arguments if the delete was successful.

Arguments:
  • key (string) – The key of the stream to delete
  • callback (function(error)) – A callback that is passed an error object if an error occurs during deletion.

VTK Web API

Tangelo offers native support for VTK Web processes. These functions help to launch, manage, query, and terminate such processes.

tangelo.vtkweb.processes(callback)

Asynchronously retrieves a list of VTK Web process keys, and invokes callback with the list.

Arguments:
  • callback (function(keys)) – The callback to invoke when the list of keys becomes available
tangelo.vtkweb.info(key, callback)

Retrieves a status report about the VTK Web process keyed by key, then invokes callback with it when it becomes available.

The report is a JavaScript object containing a status field indicating whether the request succeeded (“complete”) or not (“failed”). If the status is “failed”, the reason field will explain why.

A successful report will contain a process field that reads either “running” or “terminated”. For a terminated process, the returncode field will contain the exit code of the process.

For running processes, there are additional fields: port, reporting the port number the process is running on, and stdout and stderr, which contain a list of lines coming from those two output streams.

This function may be useful for debugging an errant VTK Web script.

tangelo.vtkweb.launch(cfg)

Attempts to launch a new VTK Web process by running a Python script found at cfg.url, passing cfg.argstring as commandline arguments to the launcher script. If successful, the streaming image output will be sent to the first DOM element matching the CSS selector given in cfg.viewport, which should generally be a div element.

After the launch attempt succeeds or fails, callback is invoked, passing the process key as the first argument, and the error object describing any errors that occurred as the second (or undefined if there was no error).

Arguments:
  • cfg.url (string) – A relative or absolute web path referring to a VTK Web script
  • cfg.argstring (string) – A string containing command line arguments to pass to the launcher script
  • cfg.viewport (string) – A CSS selector for the div element to serve as the graphics viewport for the running process
  • cfg.callback (function(key,error)) – A callback that reports the key of the new process, or the error that occured
tangelo.vtkweb.terminate(key[, callback])

Attempts to terminate the VTK Web process keyed by key. If there is a callback, it will be invoked with the key of the terminated process, the DOM element that was the viewport for that process, and an error (if any). The key is passed to the callback in case this function is called several times at once, and you wish to distinguish between the termination of different processes. The DOM element is passed in case you wish to change something about the appearance of the element upon termination.

Arguments:
  • key (string) – The key of the process to terminate
  • callback (function(key,viewport,error)) – A callback that will be invoked upon completion of the termination attempt

jQuery plugins

Tangelo defines several jQuery plugins to provide convenient behaviors or to implement common visualization methods. See Creating jQuery Widgets for more information.

$.svgColorLegend(cfg)

Constructs an SVG color legend in the g element specified by cfg.legend, mapping colors from the elements of cfg.categories through the function cfg.cmap_func.

Arguments:
  • cfg.legend (string) – CSS selector for SVG group element that will contain the legend
  • cfg.cmap_func (function) – A colormapping function to create color patches for the legend entries
  • cfg.xoffset (integer) – How far, in pixels, to set the legend from the left edge of the parent SVG element.
  • cfg.yoffset (integer) – How far, in pixels, to set the legend from the top edge of the parent SVG element.
  • cfg.categories (string[]) – A list of strings naming the categories represented in the legend.
  • cfg.height_padding (integer) – How much space, in pixels, to place between legend entries.
  • cfg.width_padding (integer) – How much space, in pixels, to place between a color patch and its associated label
  • cfg.text_spacing (integer) – How far, in pixels, to raise text labels (used to vertically center text within the vertical space occupied by a color patch).
  • cfg.legend_margins (object) – An object with (optional) fields top, bottom, left, and right, specifying how much space, in pixels, to leave between the edge of the legend and the entries.
  • cfg.clear (bool) – Whether to clear out the previous contents of the element selected by cfg.legend.
$.dendrogram(spec)
Arguments:
  • spec.data (object) – A nested tree object where child nodes are stored in the children attribute.
  • spec.label (accessor) – The accessor for displaying tree node labels.
  • spec.id (accessor) – The accessor for the node ID.
  • spec.nodeColor (accessor) – The accessor for the color of the nodes.
  • spec.labelSize (accessor) – The accessor for the font size of the labels.
  • spec.lineWidth (accessor) – The accessor for the stroke width of the node links.
  • spec.lineColor (accessor) – The accessor for the stroke color of the node links.
  • spec.nodeSize (accessor) – The accessor for the radius of the nodes.
  • spec.labelPosition (accessor) – The accessor for the label position relative to the node. Valid return values are ‘above’ and ‘below’.
  • spec.expanded (accessor) – The accessor to a boolean value that determines whether the given node is expanded or not.
  • spec.lineStyle (string) – The node link style: ‘curved’ or ‘axisAligned’.
  • spec.orientation (string) – The graph orientation: ‘vertical’ or ‘horizontal’.
  • spec.duration (number) – The transition animation duration.
  • spec.on (object) – An object of event handlers. The handler receives the data element as an argument and the dom node as this. If the function returns true, the default action is perfomed after the handler, otherwise it is prevented. Currently, only the ‘click’ event handler is exposed.

Constructs an interactive dendrogram.

resize()

Temporarily turns transitions off and resizes the dendrogram. Should be called whenever the containing dom element changes size.

$.geodots(spec)

Constructs a map from a GeoJSON specification, and plots colored SVG dots on it according to spec.data.

spec.worldGeometry is a web path referencing a GeoJSON file. spec.data is an array of JavaScript objects which may encode geodata attributes such as longitude and latitude, and visualization parameters such as size and color, while spec.latitude, spec.longitude, and spec.size are accessor specifications describing how to derive the respective values from the data objects. spec.color is an accessor deriving categorical values to put through a color mapping function.

_images/geodots-small.png

For a demonstration of this plugin, see the geodots example.

Arguments:
  • spec.worldGeometry (string) – A web path to a GeoJSON file
  • spec.latitude (accessor) – An accessor for the latitude component
  • spec.longitude (accessor) – An accessor for the longitude component
  • spec.size (accessor) – An accessor for the size of each plotted circle
  • spec.color (accessor) – An accessor for the colormap category for each plotted circle

Constructs a map from a GeoJSON specification, and plots a node-link diagram on it according to spec.data. This plugin produces similar images as $.geodots() does.

spec.worldGeometry is a web path referencing a GeoJSON file.

spec.data is an object containing two fields: nodes and links. The nodes field contains an array of JavaScript objects of the exact same structure as the spec.data array passed to $.geodots(), encoding each node’s location and visual properties.

The links field contains a list of objects, each encoding a single link by specifying its source and target node as an index into the nodes array. spec.linkSource and spec.linkTarget are accessors describing how to derive the source and target values from each of these objects.

The plugin draws a map with nodes plotted at their specified locations, with the specified links drawn as black lines between the appropriate nodes.

_images/geonodelink-small.png

For a demonstration of this plugin, see the geonodelink example.

Arguments:
  • spec.data (object) – The encoded node-link diagram to plot
  • spec.worldGeometry (string) – A web path to a GeoJSON file
  • spec.nodeLatitude (accessor) – An accessor for the latitude component of the nodes
  • spec.nodeLongitude (accessor) – An accessor for the longitude component of the nodes
  • spec.nodeSize (accessor) – An accessor for the size of each plotted circle
  • spec.nodeColor (accessor) – An accessor for the colormap category for each plotted circle
  • spec.linkSource (accessor) – An accessor to derive the source node of each link
  • spec.linkTarget (accessor) – An accessor to derive the target node of each link
$.mapdots(spec)

This plugin performs the same job as $.geodots(), but plots the dots on an interactive Google Map rather than a GeoJSON map. To this end, there is no need for a “worldGeometry” argument, but the data format and other arguments remain the same.

_images/mapdots-small.png

For a demonstration of this plugin, see the mapdots example.

Arguments:
  • spec.data (object[]) – The list of dots to plot
  • spec.latitude (accessor) – An accessor for the latitude component
  • spec.longitude (accessor) – An accessor for the longitude component
  • spec.size (accessor) – An accessor for the size of each plotted circle
  • spec.color (accessor) – An accessor for the colormap category for each plotted circle
$.geojsMap(spec)

This plugin provides a low level interface to the geojs mapping library. For a simple example of using this plugin, see the geojsMap example.

Arguments:
  • spec.zoom (integer) – The initial zoom level of the map.

The widget also contains the following public methods for drawing on the map.

latlng2display(points)

Converts a point or points in latitude/longitude coordinates into screen pixel coordinates. This function takes in either a geo.latlng object or an array of such objects. It always returns an array of objects with properties:

  • x the horizontal pixel coordinate
  • y the vertical pixel coordinate
Arguments:
  • point (geo.latlng) – The world coordinate(s) to be converted
display2latlng(points)

This is the inverse of latlng2display returning an array of geo.latlng objects.

Arguments:
  • point (object) – The world coordinate(s) to be converted
svg()

Returns an svg DOM element contained in the geojs map. This element directly receives mouse events from the browser, so you can attach event handlers to svg elements as if the map were not present. You can call stopPropagation to customize user intaraction and to prevent mouse events from reaching the map.

map()

Returns the geojs map object for advanced customization.

Users of this plugin should attach a handler to the draw event that recomputes the pixel coordinates and redraws the svg elements. The plugin will trigger this event whenever the map is panned, zoomed, or resized.

$.geojsdots(spec)

This plugin is similar to $.mapdots(), but plots the dots using the geojsMap plugin.

For a demonstration of this plugin, see the geojsdots example.

Arguments:
  • spec.data (object[]) – The list of dots to plot
  • spec.latitude (accessor) – An accessor for the latitude component
  • spec.longitude (accessor) – An accessor for the longitude component
  • spec.size (accessor) – An accessor for the size of each plotted circle
  • spec.color (accessor) – An accessor for the colormap category for each plotted circle

Constructs an interactive node-link diagram. spec.data is an object with nodes and links fields, each of which is a list of objects. The nodes list objects specify the nodes’ visual properties, while the links list simply specifies the nodes at the end of each link, as indices into the nodes list.

The accessors spec.linkSource and spec.linkTarget specify how to extract the source and target information from each link object, while spec.nodeSize and spec.nodeColor specify how to extract these visual properties from the node objects, much as in the $.geonodelink() plugin. spec.nodeCharge specifies the simulated electrostatic charge on the nodes, for purposes of running the interactive node placement algorithm (see the D3 documentation for more information). Finally, spec.nodeLabel is an accessor describing what, if any, text label should be attached to each node.

Arguments:
  • spec.data (object) – The node-link diagram data
  • spec.nodeSize (accessor) – An accessor for the size of each node
  • spec.nodeColor (accessor) – An accessor for the colormap category for each node
  • spec.nodeLabel (accessor) – An accessor for each node’s text label
  • spec.nodeCharge (accessor) – An access for each node’s simulated electrostatic charge
  • spec.linkSource (accessor) – An accessor to derive the source node of each link
  • spec.linkTarget (accessor) – An accessor to derive the target node of each link
$.correlationPlot(spec)

Constructs a grid of scatter plots that are designed to show the relationship between different variables or properties in a dataset.

Arguments:
  • spec.variables (object[]) – An array of functions representing variables or properties of the dataset. Each of these functions takes a data element as an argument and returns a number between 0 and 1. In addition, the functions should have a label attribute whose value is the string used for the axis labels.
  • spec.data (object[]) – An array of data elements that will be plotted.
  • spec.color (accessor) – An accessor for the color of each marker.
  • spec.full (bool) – Whether to show a full plot layout or not. See the images below for an example. This value cannot currently be changed after the creation of the plot.
Full correlation plot layout

An example of a full correlation plot layout. All variables are shown on the horizontal and vertical axes.

Half correlation plot layout

An example of a half correlation plot layout. Only the upper left corner of the full layout are displayed.

$.timeline(spec)

Constructs a line plot with time on the x-axis and an arbitrary numerical value on the y-axis.

Arguments:
  • spec.data (object[]) – An array of data objects from which the timeline will be derived.
  • spec.x (accessor) – An accessor for the time of the data.
  • spec.y (accessor) – An accessor for the value of the data.
  • spec.transition (number) – The duration of the transition animation in milliseconds, or false to turn off transitions.
xScale()
yScale()

These return a d3 linear scale representing the transformation from plot coordinates to screen pixel coordinates. They make it possible to add custom annotations to the plot by appending an svg element to the d3.select(‘.plot’) selection at the coordinates returned by the scales.

An example timeline plot

Table Of Contents

Previous topic

Python Web Service API

Next topic

Building a Tangelo Web Application from Scratch

This Page