Tour API Demos Download Tests
Aperture version 1.0
Generated by: JsDoc Toolkit 2.4.0

Class aperture.Ordinal

Represents an ordinal model property range. Unlike Scalar property mappings, which interpolate, Ordinals map ordered model cases to order visual property options: for instance series colors, or up / down indicators.

Class Summary
Constructor Attributes Constructor Name and Description
 
aperture.Ordinal(name, values)
Constructs a new ordinal range.

Method Summary

Class Detail

aperture.Ordinal(name, values)
Constructs a new ordinal range.
Parameters:
{String} name
the name of the property described.
{Array|Object} values Optional
an optional array of ordinal values/cases with witch to populate the object, or a single such value.
Returns:
{this} a new Ordinal

Method Detail

  • {aperture.Ordinal} banded()
    Returns a new banded scalar view of this range which maps to the normalized center of band. Banded views are used for axis articulation. Banded views are live, meaning subsequent range changes are allowed.
    Returns:
    {aperture.Ordinal} a new scalar view of this Range, with limitations on further view creation.
  • {this} expand(value)
    Expands the property range to encompass the value, if necessary.
    Parameters:
    {Array|Object} value
    a case or set of cases to include in the property range.
    Returns:
    {this} a reference to this property.
  • indexOf(value)
    Returns the index of the specified value, or -1 if not found.
    Parameters:
    value
  • map(value)
    Returns the mapped index of the specified value, adding it if it has not already been seen.
    Parameters:
    value
  • {aperture.MapKey} mappedTo(to)
    Creates a key for mapping from this model range to a visual property range.
    Parameters:
    {Array} to
    the ordered set of colors or numbers to map to, from this property's range.
    Returns:
    {aperture.MapKey} a new map key.
  • {this} reset(values)
    Clears the property range, then optionally expands it with new values.
    Parameters:
    {Array|Object} values Optional
    an optional array of ordinal values/cases with witch to repopulate the object, or a single such value.
    Returns:
    {this} a reference to this property.
  • revoke(value)
    Removes a property value from the set of ordinal cases.
    Parameters:
    value
    a case to remove from the property.
    Returns:
    the value removed, or null if not found.