Module: ojchart-utils

Oracle® JavaScript Extension Toolkit (JET)
15.1.0

F83698-01

QuickNav

JET Modules

See JET Module Loading for an overview of module usage within JET.

Functions

getLabelFormatInfo(options) : {{minimumFractionDigits: number, maximumFractionDigits: number}}

Computes values for the minimum and maximum number of fractional digits for the chart axis ticklabels. It may be desirable to leverage this calculation in the converter configuration when specifying external converters.
Parameters:
Name Type Description
options Object An object containing formatting information for the chart axis ticklabels.
Properties
Name Type Argument Description
step number <optional>
The increment between major tick marks. Defaults to null for automatic calculation based on the data. For log axis, the step is a multiplier, so for example, if the step is 2, the major tick marks will be assumed to render at 1, 2, 4, 8, and so on.
scale 'linear' | 'log' <optional>
Defines whether the axis scale 'log' or 'linear'. Defaults to linear.
range Object An object defining the range of chart values. This could be used as either axis range or data range depending on rangeType property.
Properties
Name Type Description
min number The minimum value of the axis or data.
max number Them maximum value of the axis or data.
rangeType 'axis' | 'data' Defines whether the range is data range or axis range. When rangeType is set to 'data', range.min and range.max are treated as min and max of chart data and ticklabels info are generated by calculating new axis min and axis max calculated according to range.min and range.max. If rangeType is 'axis', range.min and range.max act as axis min and axis max for the chart and ticklabels info are generated accordingly.
Returns:

An object containing properties for the chart tickaxis formatting.

Type
{minimumFractionDigits: number, maximumFractionDigits: number}