CategoryImpl Class
CategoryImpl contains logic for managing category data. CategoryImpl is used by the following classes: <ul> <li>CategoryAxisBase</li> <li>CategoryAxis</li> </ul>
Constructor
CategoryImpl
()
Index
Methods
Attributes
Methods
_getCoordFromValue
-
min
-
max
-
length
-
dataValue
-
offset
-
reverse
Returns a coordinate corresponding to a data values.
Parameters:
-
min
Number<p><p>The minimum for the axis.</p></p>
-
max
Number<p><p>The maximum for the axis.</p></p>
-
length
Number<p><p>The distance that the axis spans.</p></p>
-
dataValue
Number<p><p>A value used to ascertain the coordinate.</p></p>
-
offset
Number<p><p>Value in which to offset the coordinates.</p></p>
-
reverse
Boolean<p><p>Indicates whether the coordinates should start from the end of an axis. Only used in the numeric implementation.</p></p>
Returns:
<p><p>Number</p></p>
_getKeyArray
-
key
-
data
Gets an array of values based on a key.
Parameters:
-
key
String<p><p>Value key associated with the data array.</p></p>
-
data
Array<p><p>Array in which the data resides.</p></p>
Returns:
<p><p>Array</p></p>
_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:
<p><p>String</p></p>
getDataByKey
-
value
Returns an array of values based on an identifier key.
Parameters:
-
value
String<p><p>value used to identify the array</p></p>
Returns:
<p><p>Array</p></p>
getKeyValueAt
-
key
-
index
Returns a value based of a key value and an index.
Parameters:
-
key
String<p><p>value used to look up the correct array</p></p>
-
index
Number<p><p>within the array</p></p>
Returns:
<p><p>String</p></p>
getTotalMajorUnits
-
majorUnit
-
len
Returns the total number of majorUnits that will appear on an axis.
Parameters:
-
majorUnit
Object<p><p>Object containing properties related to the majorUnit.</p></p>
-
len
Number<p><p>Length of the axis.</p></p>
Returns:
<p><p>Number</p></p>
Properties
_dataType
Unknown
private
Type of data used in Data
.
_indices
Unknown
private
Object storing key data.
GUID
String
private
Constant used to generate unique id.
Attributes
calculateEdgeOffset
Boolean
Determines whether and offset is automatically calculated for the edges of the axis.
labelFormat
Object
Pattern used by the labelFunction
to format a label. The default labelFunction
values for
CategoryAxis
and CategoryAxisBase
do not accept a format object. This value can be used by
a custom method.
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
.
<dl>
<dt>val</dt><dd>Label to be formatted. (String
)</dd>
<dt>format</dt><dd>Template for formatting label. (optional)</dd>
</dl>