NumericImpl contains logic for numeric data. NumericImpl is used by the following classes:
NumericImpl_getCoordFromValuemin
max
length
dataValue
offset
reverse
Returns a coordinate corresponding to a data values.
min
Number
The minimum for the axis.
max
Number
The maximum for the axis.
length
Number
The distance that the axis spans.
dataValue
Number
A value used to ascertain the coordinate.
offset
Number
Value in which to offset the coordinates.
reverse
Boolean
Indicates whether the coordinates should start from the end of an axis. Only used in the numeric implementation.
Number
_getMinimumUnitmax
min
units
Helper method for getting a roundingUnit when calculating the minimum and maximum values.
Number
_getNiceNumberroundingUnit
Calculates a nice rounding unit based on the range.
roundingUnit
Number
The calculated rounding unit.
Number
_roundDownToNearestnumber
nearest
Rounds a Number down to the nearest multiple of an input. For example, by rounding 16 down to the nearest 10, you will receive 10. Similar to the built-in function Math.floor().
Number
_roundMinAndMaxmin
max
Rounds the mimimum and maximum values based on the roundingUnit attribute.
_roundToNearestnumber
nearest
Rounds a Number to the nearest multiple of an input. For example, by rounding 16 to the nearest 10, you will receive 20. Similar to the built-in function Math.round().
Number
_roundToPrecisionnumber
precision
Rounds a number to a certain level of precision. Useful for limiting the number of decimal places on a fractional number.
Number
_roundUpToNearestnumber
nearest
Rounds a Number up to the nearest multiple of an input. For example, by rounding 16 up to the nearest 10, you will receive 20. Similar to the built-in function Math.ceil().
Number
value
format
Formats a label based on the axis type and optionally specified format.
String
_updateMinAndMaxCalculates the maximum and minimum values for the Data.
getOriginReturns the value corresponding to the origin on the axis.
Number
getTotalByKeykey
Returns the sum of all values per key.
key
String
The identifier for the array whose values will be calculated.
Number
initializer_typeType of data used in Data.
alwaysShowZeroIndicates whether 0 should always be displayed.
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.
e
EventFacade
labelFormatObject containing properties used by the labelFunction to format a
label.
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.
e
EventFacade
labelFunctionMethod 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.
String)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.
e
EventFacade
roundingMethodIndicates how to round unit values.
Default: niceNumber
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.
e
EventFacade
Indicates the scaling for the chart. The default value is linear. For a logarithmic axis, set the value
to logarithmic.
Default: linear
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.
e
EventFacade