Top-level Functions

Top-level functions are defined in the atlas namespace.

Create Objects

functionexplanationreturn type
atlas.scene(params)create a scene
params (Object, optional): contains the following parameter
  • fillColor: background color of the scene
Scene
async atlas.csv(url)import a CSV file as a data table
url (String): path to the file
Promise
async atlas.csvFromString(data, name)import CSV data in a string as a data table
data (String): CSV data in a string
name (String): name of the data
Promise
atlas.layout(type, params)create a layout
type: layout type
params (Object): contains layout properties
Layout
atlas.linearGradient(params)create a linear gradient
params (Object): contains x1, y1, x2 and y2 properties
LinearGradient
atlas.renderer(type, domId)create a renderer
type (String): type of renderer,
possible values: “svg”, “webgl”
domId (String): ID of the SVG or Canvas element
Renderer

Helper Functions

functionexplanationreturn type
atlas.cartesianToPolar(x, y, cx, cy)converts a point in Cartesian space to polar coordinates
x (Number): x coordinate in Cartesian space
y (Number): y coordinate in Cartesian space
cx (Number): x coordinate of the polar center
cy (Number): y coordinate of the polar center
[angele (in degrees),
distance from center]
atlas.polarToCartesian(cx, cy, r, deg)converts a point in polar space to Cartesian coordinates
cx (Number): x coordinate of the polar center
cy (Number): y coordinate of the polar center
r (Number): distance from the polar center
deg (Number): angle in degrees in the polar space
[x, y]