NumericImpl Class
NumericImpl contains logic for numeric data. NumericImpl is used by the following classes:
Constructor
NumericImpl
()
Item Index
Methods
Properties
Attributes
Methods
-
value
-
format
Formats a label based on the axis type and optionally specified format.
Returns:
String
getOrigin
()
Returns the value corresponding to the origin on the axis.
Returns:
Number
getTotalByKey
-
key
Returns the sum of all values per key.
Parameters:
-
key
StringThe identifier for the array whose values will be calculated.
Returns:
Number
Properties
Attributes
alwaysShowZero
Boolean
Indicates whether 0 should always be displayed.
Fires event alwaysShowZeroChange
Fires when the value for the configuration attribute alwaysShowZero
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:
labelFormat
Object
Object containing properties used by the labelFunction
to format a
label.
Fires event labelFormatChange
Fires when the value for the configuration attribute labelFormat
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 an HTMLElement
. The default
implementation of the method returns a String
. The output of this method will be rendered to the DOM using
appendChild
. If you override the labelFunction
method and return an html string, you will also need to override
the Data' appendLabelFunction
to accept html as a String
.
- val
- Label to be formatted. (
String
) - format
- Object containing properties used to format the 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:
roundingMethod
String
Indicates how to round unit values.
- niceNumber
- Units will be smoothed based on the number of ticks and data range.
- auto
- If the range is greater than 1, the units will be rounded.
- numeric value
- Units will be equal to the numeric value.
- null
- No rounding will occur.
Default: niceNumber
Fires event roundingMethodChange
Fires when the value for the configuration attribute roundingMethod
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:
Indicates the scaling for the chart. The default value is linear
. For a logarithmic axis, set the value
to logarithmic
.
Default: linear
Fires event Change
Fires when the value for the configuration attribute `` 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: