victory-core
Version:
51 lines • 2.44 kB
TypeScript
import { D3Scale } from "../types/prop-types";
/**
* Returns the axis (x or y) of a particular axis component
* @param {Object} props: the props object.
* @param {Boolean} horizontal: true for horizontal charts
* @returns {String} the dimension appropriate for the axis given its props
*/
export declare function getAxis(props: any): "x" | "y";
/**
* Returns all axis components that pass a given predicate
* @param {Array} childComponents: an array of children
* @param {Function} predicate: a predicate function that will be called with each
* @returns {Array} all axis components that pass the given predicate or []
*/
export declare function findAxisComponents(childComponents: any, predicate?: any): any;
/**
* Returns a single axis component of the desired axis type (x or y)
* @param {Array} childComponents: an array of children
* @param {String} axis: desired axis either "x" or "y".
* @returns {ReactComponent} an axis component of the desired axis or undefined
*/
export declare function getAxisComponent(childComponents: any, axis: any): any;
/**
* Returns all axis components of the desired axis type (x or y) along with any
* parent components excluding VictoryChart
* @param {Array} childComponents: an optional array of children.
* @param {String} type: desired axis either "dependent" or "independent".
* @returns {ReactComponent} an axis component of the desired type or undefined
*/
export declare function getAxisComponentsWithParent(childComponents: any, type: any): any;
export declare function getOrigin(domain: any): {
x: number | Date;
y: number | Date;
};
export declare function getOriginSign(origin: any, domain: any): "positive" | "negative";
/**
* @param {Object} props: axis component props
* @returns {Boolean} true when the axis is vertical
*/
export declare function isVertical(props: any): any;
/**
* @param {Object} props: axis component props
* @returns {Boolean} true when tickValues contain strings
*/
export declare function stringTicks(props: any): boolean;
export declare function getTickFormat(props: any, scale: any): any;
export declare function getTicks(props: any, scale: D3Scale, filterZero?: boolean): number[] | string[];
export declare function getDomain(props: any, axis?: any): any;
export declare function getAxisValue(props: any, axis: any): any;
export declare function modifyProps(props: any, fallbackProps: any): any;
//# sourceMappingURL=axis.d.ts.map