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:
-
minNumber<p><p>The minimum for the axis.</p></p>
-
maxNumber<p><p>The maximum for the axis.</p></p>
-
lengthNumber<p><p>The distance that the axis spans.</p></p>
-
dataValueNumber<p><p>A value used to ascertain the coordinate.</p></p>
-
offsetNumber<p><p>Value in which to offset the coordinates.</p></p>
-
reverseBoolean<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:
-
keyString<p><p>Value key associated with the data array.</p></p>
-
dataArray<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:
-
valueObject
Returns:
<p><p>String</p></p>
getDataByKey
-
value
Returns an array of values based on an identifier key.
Parameters:
-
valueString<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:
-
keyString<p><p>value used to look up the correct array</p></p>
-
indexNumber<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:
-
majorUnitObject<p><p>Object containing properties related to the majorUnit.</p></p>
-
lenNumber<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>