Class: Formatter

OM.style. Formatter


new Formatter(options)

Creates a new style Formatter.

Parameters:
Name Type Description
options object

The options parameter is a JSON object containing several optional
properties, such as:

  • scale the bucketing algorithm used to format or classify data values. If not specified the default logarithm scale is used.
  • numClasses the number of buckets or classes to use during formatting.
  • style the original style that this Formatter is affecting. Optional.

Methods


getNumClasses()

Gets the desired classes or buckets for dividing the data item values.


getScale()

gets the scale (such as linear or logarithmic) used to classify data item
values.


getStyle()

Gets the original style for which this Formatter might be affecting one
of its visual attributes.