Skip to content
Christopher Clark edited this page Nov 23, 2016 · 22 revisions

API Reference

Creating a Plot - Overview

Creating a LocusZoom plot requires two pieces of information:

Once defined these values can be passed to the populate() method along with a selector to identify a div, like so:

var plot = LocusZoom.populate(selector, data_sources, layout); 

Note that the return value from the populate() method, the plot, is saved out to a variable. It is advisable to do this wherever LocusZoom.js is deployed as the plot variable can be used after being populated to do all kinds of things.

LocusZoom Structure

A Plot is an instance of LocusZoom, returned by the populate() method. A plot has a layout and various supported methods.

A Panel is a subdivided area of a plot. Panels contain graph features such as titles and axes, but not actual data. Panels occupy the full width the of the plot and are stacked vertically along the y-axis in the order they are added unless directed differently by their layouts.

A Data Layer is a layer within a panel for representing data. Data layers are stacked depth-wise along the z-axis in the other they are added unless directed differently by their layouts.

A Dashboard is an HTML element that can contain information or user interface components relevant to a plot. Dashboards can be attached to the plot as a whole or to individual panels. They are described with their own layouts nested within the layouts of the parent plot or panel.

A Legend is an SVG element belonging to a panel that annotated categories of data shown on the underlying data layers. Legends are described in general terms as a part of a panel's layout and the specific elements to appear in the legend are described by each of the panel's data layers.

Clone this wiki locally