@mui/x-charts
Version:
The community edition of MUI X Charts components.
25 lines • 1.05 kB
TypeScript
import type { NumberValue, ScalePoint } from '@mui/x-charts-vendor/d3-scale';
/**
* Constructs a new point scale with the specified range, no padding, no rounding and center alignment.
* The domain defaults to the empty domain.
* If range is not specified, it defaults to the unit range [0, 1].
*
* The generic corresponds to the data type of domain elements.
*
* @param range A two-element array of numeric values.
*/
export declare function scalePoint<Domain extends {
toString(): string;
} = string>(range?: Iterable<NumberValue>): ScalePoint<Domain>;
/**
* Constructs a new point scale with the specified domain and range, no padding, no rounding and center alignment.
* The domain defaults to the empty domain.
*
* The generic corresponds to the data type of domain elements.
*
* @param domain Array of domain values.
* @param range A two-element array of numeric values.
*/
export declare function scalePoint<Domain extends {
toString(): string;
}>(domain: Iterable<Domain>, range: Iterable<NumberValue>): ScalePoint<Domain>;