API Docs for: 0.0.1
Show:

Graph Class

Extends Synchronizable
Defined in: lib/graph.js:34
Module: niviz

Snowpack profile graph.

Constructor

Graph

()

Defined in lib/graph.js:34

Item Index

Methods

Properties

  • static

Methods

convert

(
  • type
  • object
)
Object static

Defined in lib/graph.js:114

Convert a graph into JSON or SVG format.

Parameters:

Returns:

draw

(
  • name
  • station
  • canvas
  • properties
)
Graph static

Defined in lib/graph.js:82

Request to draw a graph of a certain type. Check whether type is registered and call the constructor upon the graph.

Parameters:

  • name String

    The name of the graph (unique).

  • station Station
  • canvas Object

    A svg element that will be used as SnapSVG paper

  • properties Object

    Properties to be passed to the graph

Returns:

Graph:

An instance of the graph type

draw

()

Defined in lib/graph.js:106

implement

(
  • C
  • name
  • [type]
  • [base]
)
Function static

Defined in lib/graph.js:60

Makes the passed-in constructor inherit from Graph and registers it for the given type

Parameters:

  • C Function

    The constructor.

  • name String

    The name of the graph (unique).

  • [type] String optional

    The type, e. g. 'profile' or 'timeline'.

  • [base] String optional

    The graph from which to inherit.

Returns:

Function:

The extended constructor.

Properties

Object static

Defined in lib/graph.js:51

Registry of graph implementations.