| 1 |
import type { ChartMeta, PointElement } from '../types/index.js'; |
| 2 |
export declare function fontString(pixelSize: number, fontStyle: string, fontFamily: string): string; |
| 3 |
/** |
| 4 |
* Request animation polyfill |
| 5 |
*/ |
| 6 |
export declare const requestAnimFrame: (((callback: FrameRequestCallback) => number) & typeof requestAnimationFrame) | ((callback: any) => any); |
| 7 |
/** |
| 8 |
* Throttles calling `fn` once per animation frame |
| 9 |
* Latest arguments are used on the actual call |
| 10 |
*/ |
| 11 |
export declare function throttled<TArgs extends Array<any>>(fn: (...args: TArgs) => void, thisArg: any): (...args: TArgs) => void; |
| 12 |
/** |
| 13 |
* Debounces calling `fn` for `delay` ms |
| 14 |
*/ |
| 15 |
export declare function debounce<TArgs extends Array<any>>(fn: (...args: TArgs) => void, delay: number): (...args: TArgs) => number; |
| 16 |
/** |
| 17 |
* Converts 'start' to 'left', 'end' to 'right' and others to 'center' |
| 18 |
* @private |
| 19 |
*/ |
| 20 |
export declare const _toLeftRightCenter: (align: 'start' | 'end' | 'center') => "center" | "left" | "right"; |
| 21 |
/** |
| 22 |
* Returns `start`, `end` or `(start + end) / 2` depending on `align`. Defaults to `center` |
| 23 |
* @private |
| 24 |
*/ |
| 25 |
export declare const _alignStartEnd: (align: 'start' | 'end' | 'center', start: number, end: number) => number; |
| 26 |
/** |
| 27 |
* Returns `left`, `right` or `(left + right) / 2` depending on `align`. Defaults to `left` |
| 28 |
* @private |
| 29 |
*/ |
| 30 |
export declare const _textX: (align: 'left' | 'right' | 'center', left: number, right: number, rtl: boolean) => number; |
| 31 |
/** |
| 32 |
* Return start and count of visible points. |
| 33 |
* @private |
| 34 |
*/ |
| 35 |
export declare function _getStartAndCountOfVisiblePoints(meta: ChartMeta<'line' | 'scatter'>, points: PointElement[], animationsDisabled: boolean): { |
| 36 |
start: number; |
| 37 |
count: number; |
| 38 |
}; |
| 39 |
/** |
| 40 |
* Checks if the scale ranges have changed. |
| 41 |
* @param {object} meta - dataset meta. |
| 42 |
* @returns {boolean} |
| 43 |
* @private |
| 44 |
*/ |
| 45 |
export declare function _scaleRangesChanged(meta: any): boolean; |