UNPKG

victory-core

Version:
75 lines 3.12 kB
export declare function formatDataFromDomain(dataset: any, domain: any, defaultBaseline?: any): any; /** * Returns an object mapping string data to numeric data * @param {Object} props: the props object * @param {String} axis: the current axis * @returns {Object} an object mapping string data to numeric data */ export declare function createStringMap(props: any, axis: any): any; /** * Reduces the size of a data array, such that it is <= maxPoints. * @param {Array} data: an array of data; must be sorted * @param {Number} maxPoints: maximum number of data points to return * @param {Number} startingIndex: the index of the data[0] *in the entire dataset*; this function assumes `data` param is a subset of larger dataset that has been zoommed * @returns {Array} an array of data, a subset of data param */ export declare function downsample(data: any, maxPoints: any, startingIndex?: number): any; /** * Returns formatted data. Data accessors are applied, and string values are replaced. * @param {Array} dataset: the original domain * @param {Object} props: the props object * @param {Array} expectedKeys: an array of expected data keys * @returns {Array} the formatted data */ export declare function formatData(dataset: any[], props: any, expectedKeys?: string[]): any; /** * Returns generated x and y data based on domain and sample from props * @param {Object} props: the props object * @returns {Array} an array of data */ export declare function generateData(props: any): { x: number; y: number; }[]; /** * Returns an array of categories for a given axis * @param {Object} props: the props object * @param {String} axis: the current axis * @returns {Array} an array of categories */ export declare function getCategories(props: any, axis: any): any; /** * Returns an array of formatted data * @param {Object} props: the props object * @returns {Array} an array of data */ export declare function getData(props: any): any; /** * Returns an array of strings from axis tickValues for a given axis * @param {Object} props: the props object * @param {String} axis: the current axis * @returns {Array} an array of strings */ export declare function getStringsFromAxes(props: any, axis: any): any; /** * Returns an array of strings from categories for a given axis * @param {Object} props: the props object * @param {String} axis: the current axis * @returns {Array} an array of strings */ export declare function getStringsFromCategories(props: any, axis: any): any; /** * Returns an array of strings from data * @param {Object} props: the props object * @param {String} axis: the current axis * @returns {Array} an array of strings */ export declare function getStringsFromData(props: any, axis: any): any; /** * Checks whether a given component can be used to calculate data * @param {Component} component: a React component instance * @returns {Boolean} Returns true if the given component has a role included in the whitelist */ export declare function isDataComponent(component: any): boolean; //# sourceMappingURL=data.d.ts.map