CategoryImpl Class
CategoryImpl contains logic for managing category data. CategoryImpl is used by the following classes:
Constructor
CategoryImpl
()
Item Index
Methods
Attributes
Methods
_getCoordFromValue
-
min
-
max
-
length
-
dataValue
-
offset
-
reverse
Returns a coordinate corresponding to a data values.
Parameters:
-
min
NumberThe minimum for the axis.
-
max
NumberThe maximum for the axis.
-
length
LengthThe distance that the axis spans.
-
dataValue
NumberA value used to ascertain the coordinate.
-
offset
NumberValue in which to offset the coordinates.
-
reverse
BooleanIndicates whether the coordinates should start from the end of an axis. Only used in the numeric implementation.
Returns:
Number
_getKeyArray
-
key
-
data
Gets an array of values based on a key.
Parameters:
Returns:
Array
_updateMinAndMax
()
private
Calculates the maximum and minimum values for the Data
.
formatLabel
-
value
Formats a label based on the axis type and optionally specified format.
Parameters:
-
value
Object
Returns:
String
getDataByKey
-
value
Returns an array of values based on an identifier key.
Parameters:
-
value
Stringvalue used to identify the array
Returns:
Array
getKeyValueAt
-
key
-
index
Returns a value based of a key value and an index.
Returns:
String
Properties
_dataType
Unknown
private
Type of data used in Data
.
_indices
Unknown
private
Object storing key data.
Attributes
calculateEdgeOffset
Boolean
Determines whether and offset is automatically calculated for the edges of the axis.
Fires event calculateEdgeOffsetChange
Fires when the value for the configuration attribute calculateEdgeOffset
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
labelFunction
Function
Method used for formatting a label. This attribute allows for the default label formatting method to overridden.
The method use would need to implement the arguments below and return a String
or HTMLElement
.
- val
- Label to be formatted. (
String
) - format
- Template for formatting label. (optional)
Fires event labelFunctionChange
Fires when the value for the configuration attribute labelFunction
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added: