Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ScaleSymLog

A bi-symmetric log transformation for wide-range data by Webber scale defined over a numeric domain.

Continuous scales map a continuous, quantitative input domain to a continuous output range.

See “A bi-symmetric log transformation for wide-range data” by Webber for more

If the range is also numeric, the mapping may be inverted.

Note that the data types of the range and output of the scale must be compatible with the interpolator applied by the scale.

The first generic corresponds to the data type of the range elements.

The second generic corresponds to the data type of the output elements generated by the scale.

The third generic corresponds to the data type of the unknown value.

If range element and output element type differ, the interpolator factory used with the scale must match this behavior and convert the interpolated range element to a corresponding output element.

interface ScaleSymLog <Range, Output, Unknown = never> extends ScaleContinuousNumeric<Range, Output, Unknown> {
constant(): number;
constant(constant: number): this;
tickFormat(count?: number, specifier?: string): (d: NumberValue) => string;
unknown(): UnknownReturnType<Unknown, undefined>;
unknown<NewUnknown>(value: NewUnknown): ScaleSymLog<Range, Output, NewUnknown>;
}

§Type Parameters

§
Range
[src]
§
Output
[src]
§
Unknown = never
[src]

§Extends

§
ScaleContinuousNumeric<Range, Output, Unknown>
[src]

§Methods

§
constant(): number
[src]

Returns the current constant, which defaults to 1.

§
constant(constant: number): this
[src]

Sets the symlog constant to the specified number and returns this scale; otherwise returns the current value of the symlog constant, which defaults to 1. See “A bi-symmetric log transformation for wide-range data” by Webber for more.

§
tickFormat(count?: number, specifier?: string): (d: NumberValue) => string
[src]

Returns a number format function suitable for displaying a tick value, automatically computing the appropriate precision based on the fixed interval between tick values.

The specified count typically has the same value as the count that is used to generate the tick values. If there are too many ticks, the formatter may return the empty string for some of the tick labels; however, note that the ticks are still shown. To disable filtering, specify a count of Infinity. When specifying a count, you may also provide a format specifier or format function. For example, to get a tick formatter that will display 20 ticks of a currency, say log.tickFormat(20, "$,f"). If the specifier does not have a defined precision, the precision will be set automatically by the scale, returning the appropriate format. This provides a convenient way of specifying a format whose precision will be automatically set by the scale.

@param count

Approximate number of ticks to be used when calculating precision for the number format function.

@param specifier

An optional valid format specifier string which allows a custom format where the precision of the format is automatically set by the scale as appropriate for the tick interval. For example, to get a tick formatter that will display 20 ticks of a currency, say log.tickFormat(20, "$,f"). If the specifier does not have a defined precision, the precision will be set automatically by the scale, returning the appropriate format. This provides a convenient way of specifying a format whose precision will be automatically set by the scale.

§
unknown(): UnknownReturnType<Unknown, undefined>
[src]

Returns the current unknown value, which defaults to undefined.

§
unknown<NewUnknown>(value: NewUnknown): ScaleSymLog<Range, Output, NewUnknown>
[src]

Sets the output value of the scale for undefined (or NaN) input values and returns this scale.

@param value

The output value of the scale for undefined (or NaN) input values.