API Docs for: 0.6.0
Show:

sgvizler.registry Class

Defined in: src/registry.js:4

Static class for handling functions used for drawing charts, mainpulating datacharts, and what their dependencies are.

Dependencies:

  • sgvizler.util

See also:

  • sgvizler.charts, sgvizler.datatables (classes for creating new such functions)
  • sgvizler.loader (class for loading dependencies)

Methods

addFunction

(
  • module
  • name
  • type
  • dependencies
)
protected

Defined in src/registry.js:236

Available since 0.6.0

Add function to registry.

Parameters:

  • module String

    name of module to which function belongs.

  • name String

    name of function.

  • type String

    of function, usually either 'chart', 'datatable'.

  • dependencies Object

    list of function name--dependency pairs. Example: { 'XYZ': 'http://example.org/XYZ.js' } if the function requires the XYX function to draw and this function is located at http://example.org/XYZ.js.

chartModules

() Array protected

Defined in src/registry.js:173

Available since 0.6.0

Get list of registered chart module (names), i.e., modules for which there are registered functions for drawing charts.

Returns:

Array:

(an array of strings)

chartsFunctions

() Array protected

Defined in src/registry.js:186

Available since 0.6.0

Get list of registered chart functions names (not the functions themselves).

Returns:

Array:

(an array of strings)

getDependencies

(
  • functionName
)
Array protected

Defined in src/registry.js:214

Available since 0.6.0

Get list of dependencies, either google visualization packages or javascripts (URLs), for given function name.

Parameters:

Returns:

Array:

(an array of strings)

Properties

DATATABLE

String private final

Defined in src/registry.js:35

Available since 0.6.0

The Google Visualization DataTable class name.

GVIZ

String private final

Defined in src/registry.js:25

Available since 0.6.0

The Google Visualization package name.

GVIZ

String private final

Defined in src/registry.js:45

Available since 0.6.0

The Google Maps package name.

modules

Object private

Defined in src/registry.js:55

Available since 0.6.0

Stores the modules of the registered functions according to the type of function, i.e., chart or datatable.

registry

Object private

Defined in src/registry.js:69

Available since 0.6.0

Stores registered function names and their dependencies, e.g., specifies which google visualization packages to load for the different charts.

Property legend:

  • t: type. Values: core, datatable, chart (default)
  • d: dependences. Object containing functions--gviz package/js file
    • i: the function itself, as in I.