client/widget-factory

A factory producing the Ampersand models corresponding to the different chart types.

Source:
Example
var factory = require('./model-factory')

var model = factory.newModel(attr,options);

Members

(static) widgets

An Ampersand collection containing all available widgets

Source:

Methods

(static) newModel(attrs, options) → {Model}

Create a new Ampersand model for a widget

Parameters:
Name Type Description
attrs Object

Used for initialization of model properties, passed on to the model constructor.

options Object

passed on to the model constructor, see https://github.com/AmpersandJS/ampersand-model#constructorinitialize-new-extendedampersandmodelattrs-options

Source:
Returns:

widget - An Ampersand model representing the widget

Type
Model