UNPKG

@nova-ui/charts

Version:

Nova Charts is a library created to provide potential consumers with solutions for various data visualizations that conform with the Nova Design Language. It's designed to solve common patterns identified by UX designers, but also be very flexible so that

56 lines (55 loc) 1.96 kB
import { Scale } from "./scale"; import { IScale } from "./types"; /** @ignore */ export declare class PointScale extends Scale<string> { constructor(id?: string); protected createD3Scale(): any; convert(value: string): number; invert(coordinate: number): string; /** * Gets the rounded setting for the scale * * @returns {boolean} The value indicating whether the scale is rounded */ round(): boolean; /** * Sets whether the scale should be rounded * Rounding helps to have crisp edges https://github.com/d3/d3-scale#band_round * * @param {boolean} round The specified round setting */ round(round: boolean): IScale<string>; /** * A convenience method for setting the inner and outer padding. * This differs from D3 implementation. We're setting the outer padding to half of the inner padding. * * @param padding Value in [0, 1] interval. */ padding(padding: number): IScale<string>; /** * Returns the current alignment which defaults to 0.5. * * @returns {number} The current alignment */ align(): number; /** * Sets the alignment to the specified value which must be in the range [0, 1]. * * The default is 0.5. * * The alignment determines how any leftover unused space in the range is distributed. * A value of 0.5 indicates that the leftover space should be equally distributed before the first band and * after the last band, i.e. the bands should be centered within the range. A value of 0 or 1 may be used to * shift the bands to one side, say to position them adjacent to an axis. * * @param {number} align Value for alignment setting in [0, 1] interval. */ align(align: number): this; /** * Returns the width of each band * * @returns {number} The width of each band */ bandwidth(): number; isContinuous(): boolean; }