/** * @enum {AXIS_ORIENTATION_TYPES} */ export declare enum AXIS_ORIENTATION_TYPES { VERTICAL = "vertical", HORIZONTAL = "horizontal" } /** * @enum {BUBBLE_ROW_SCALE_TYPES} */ export declare enum BUBBLE_ROW_SCALE_TYPES { GLOBAL = "global", ROW = "row" } /** * @enum {BUBBLE_SCALE_TYPES} */ export declare enum BUBBLE_SCALE_TYPES { RADIUS = "radius", AREA = "area" } /** * @enum {COLOR_MODE_TYPES} */ export declare enum COLOR_MODE_TYPES { SEQUENTIAL = "sequential", CATEGORICAL = "categorical" } /** * @enum {BUBBLE_LABELS_TYPES} */ export declare enum BUBBLE_LABELS_TYPES { ALL = "all", MAX = "max", NONE = "none" } /** * @string GRAYSCALE_FILTER_ID */ export declare const GRAYSCALE_FILTER_ID: string; /** * get a mapping of categories to colors given all categories * @method getColorCategoryMapping * @param {Object} input * @param {Array} category * @param {COLOR_MODE_TYPES} colorMode * @param {Array} seriesColors * @return {Function} colorCategoryMapping */ export declare const getColorCategoryMapping: ({ category, colorMode, seriesColors }: { category: any; colorMode: any; seriesColors: any; }) => import("d3-scale").ScaleOrdinal; /** * get punchcard dimensions given container width and height * @method getChartAreaDimensions * @param {Object} input * @param {Number} containerWidth * @param {Number} containerHeight * @param {Boolean} displayLegend * @return {Object} dimensions * @return {Number} dimensions.xAxisStartY * @return {Number} dimensions.yAxisStartX * @return {Number} dimensions.chartAreaStartX * @return {Number} dimensions.chartAreaStartY * @return {Number} dimensions.chartAreaEndX * @return {Number} dimensions.chartAreaEndY */ export declare const getChartAreaDimensions: ({ containerWidth, containerHeight, displayLegend }: { containerWidth: any; containerHeight: any; displayLegend: any; }) => { xAxisStartY: number; yAxisStartX: number; chartAreaStartX: number; chartAreaStartY: number; chartAreaEndX: number; chartAreaEndY: number; legendStartX: any; }; /** * gets a scale used to map values to x or y plane * @method getScales * @param {Object} input * @param {(Array\|Array)} values * @param {Number} start * @param {Number} end * @return {Object} scales * @return {Function} scales.scale function to return beginning of band * @return {Function} scales.positionScale function to return middle of band */ export declare const getScales: ({ values, start, end }: { values: any; start: any; end: any; }) => { scale: import("d3-scale").ScaleBand; positionScale: (value: any) => number; }; /** * Maps an array of values to a percentage * Excludes zero values and takes the absolute minimum and maximum value * @method createValueScale * @param {Array} values * @return {Function} radiusScale */ export declare const createValueScale: (values: any) => import("d3-scale").ScaleLinear; /** * @typedef RowData * @type {Object} * @property {(Array\|Array)} rowXValues * @property {Array} rowSizeValues * @property {Array} rowCategoryValues * @property {Array} rowColorValues * @property {Array} rowFillOpacityValues * @property {Function} rowSizeScale * @property {Array} rowRadiusValue */ interface RowData { rowXValues: (string | number)[]; rowSizeValues: number[]; rowCategoryValues: string[]; rowColorValues: number[]; rowFillOpacityValues: number[]; rowSizeScale: (...args: any) => void; rowRadiusValues: number[]; } /** * Given a dataset, partition it by row and for each row: * get x, size, category and rowSizeScales * @method getDataByRows * @param {Object} input * @param {BUBBLE_ROW_SCALE_TYPES} bubbleRowScale * @param {BUBBLE_SCALE_TYPES} bubbleScale * @param {Array} category * @param {Function} colorCategoryMapping * @param {COLOR_MODE_TYPES} colorMode * @param {(String|Array)} bubbleColor * @param {Number} minBubbleColorIntensity * @param {Array} size * @param {(Array\|Array)} x * @param {(Array\|Array)} y * @param {Boolean} isBubbleSizeDynamic * @param {Number} minBubbleSize // Used when isBubbleSizeDynamic * @param {Number} maxBubbleSize // Used when isBubbleSizeDynamic * @param {Number} minBand // Used to calculated radius when isBubbleSizeDynamic * @param {Number} maxBubbleRadius // Used when !isBubbleSizeDynamic * @param {Number} minBubbleRadius // Used when !isBubbleSizeDynamic * @return {Object} dataByRows */ export declare const getDataByRows: ({ bubbleRowScale, bubbleScale, category, colorCategoryMapping, colorMode, bubbleColor, minBubbleColorIntensity, size, x, y, isBubbleSizeDynamic, minBubbleSize, maxBubbleSize, minBand, maxBubbleRadius, minBubbleRadius, }: { bubbleRowScale: any; bubbleScale: any; category: any; colorCategoryMapping: any; colorMode: any; bubbleColor: any; minBubbleColorIntensity: any; size: any; x: any; y: any; isBubbleSizeDynamic: any; minBubbleSize: any; maxBubbleSize: any; minBand: any; maxBubbleRadius: any; minBubbleRadius: any; }) => { [key: string]: RowData; }; /** * Given selected dimensions * return true if there is something currently being selected * @method isSomethingSelected * @param {Object} input * @param {String|Number} selectedX * @param {String|Number} selectedY * @param {String} selectedCategory * @return {Boolean} */ export declare const isSomethingSelected: ({ selectedX, selectedY, selectedCategory }: { selectedX: any; selectedY: any; selectedCategory: any; }) => boolean; /** * Given selected dimensions and a specific bubble's values * return true if that bubble should be selected * @method isBubbleSelected * @param {Object} input * @param {String|Number} selectedX * @param {String|Number} selectedY * @param {String} selectedCategory * @param {String|Number} xValue * @param {String|Number} yValue * @param {Boolean} categoryValue * @return {Boolean} */ export declare const isBubbleSelected: ({ selectedX, selectedY, selectedCategory, xValue, yValue, categoryValue, }: { selectedX: any; selectedY: any; selectedCategory: any; xValue: any; yValue: any; categoryValue: any; }) => boolean; /** * Given text and available width, the truncateAxisLabelText will ellipsize * the truncateLocation of the text * @method truncateAxisLabelText * @param {Object} input * @param {String} label - The text to truncate * @param {Number} widthInPX - Available width to render the text * @param {('ellipsisStart' | 'ellipsisEnd')} axisLabelOverflowMode - Truncate start or end of the text */ export declare const truncateAxisLabelText: ({ label, widthInPX, axisLabelOverflowMode, }: { label: any; widthInPX?: number; axisLabelOverflowMode?: string; }) => any; /** * Gets bubble accessible name * @method getBubbleAccessibleName * @param {String} categoryValue * @param {String|Number} xValue * @param {String|Number} yValue * @param {Number} sizeValue */ export declare const getBubbleAccessibleName: ({ categoryValue, xValue, yValue, sizeValue }: { categoryValue: any; xValue: any; yValue: any; sizeValue: any; }) => string; interface AddNullValuesToRowData { rowData: RowData; uniqX: (string | number)[]; } /** * Given rowData and all x values in a row * adds null values in places where there's no data * @method addNullValuesToRowData * @param {RowData} rowData * @param {Array} uniqX * @return {RowData} */ export declare const addNullValuesToRowData: ({ rowData, uniqX }: AddNullValuesToRowData) => RowData; interface GetElementToFocusReturnType { x: string | number; y: string | number; category: string | null; size: string | number | null; } /** * Get next element to focus for key down handler * @method getElementToFocus * @param {Array} category * @param {Array} bubbleSizes * @param {Array} x * @param {Array} y * @param {Array} uniqX * @param {Array} uniqY * @param {String|Number} selectedX * @param {String|Number} selectedY * @param {String} selectedCategory * @param {String} key * @return {GetElementToFocusReturnType} */ export declare const getElementToFocus: ({ category, bubbleSizes, x, y, uniqX, uniqY, selectedX, selectedY, selectedCategory, key, }: { category: any; bubbleSizes: any; x: any; y: any; uniqX: any; uniqY: any; selectedX: any; selectedY: any; selectedCategory: any; key: any; }) => GetElementToFocusReturnType; export declare function calculateLuminance(fg: string, bg: string): number; export {}; //# sourceMappingURL=punchcardUtils.d.ts.map