@antv/t8
Version:
T8 is a text visualization solution for unstructured data within the AntV technology stack, and it is a declarative JSON Schema syntax that can be used to describe the content of data interpretation reports.
24 lines • 1 kB
TypeScript
/**
* Domain is the input range [min, max] of values to be scaled
* For example, if we have data values ranging from 0 to 100, the domain would be [0, 100]
*/
export type Domain = [number, number];
/**
* Range is the output range [min, max] that domain values will be mapped to
* For example, if we want to map our data to a 400px width chart, range would be [0, 400]
*/
export type Range = [number, number];
/**
* Scale is a function that maps a value from domain to range
* It takes a number input and returns the scaled output
*/
export type Scale = (n: number) => number;
/**
* Creates a linear scale function that maps values from domain to range
*
* @param domain - Input range [min, max] of values to be scaled
* @param range - Output range [min, max] that domain values will be mapped to
* @returns A function that performs the linear scaling transformation
*/
export declare const scaleLinear: (domain: Domain, range: Range) => Scale;
//# sourceMappingURL=scaleLinear.d.ts.map