import { DataType } from 'apache-arrow'; import { CosmographConfig } from ".."; import { SizeAccessorFn } from "../config/interfaces/data"; export declare enum LinkWidthStrategy { /** * Uses the sum of numeric values between the same source and target points in {@link CosmographConfig.linkWidthBy linkWidthBy} to determine link widths and interpolates them from {@link CosmographConfig.linkWidthRange linkWidthRange}. * - Has effect only if {@link CosmographConfig.linkWidthBy linkWidthBy} provided and contains numeric data. */ Sum = "sum", /** * Uses the average of numeric values between the same source and target points in {@link CosmographConfig.linkWidthBy linkWidthBy} to determine link widths and interpolates them from {@link CosmographConfig.linkWidthRange linkWidthRange}. * - Has effect only if {@link CosmographConfig.linkWidthBy linkWidthBy} provided and contains numeric data. */ Average = "average", /** * Uses the count of links between the same source and target points in {@link CosmographConfig.linkWidthBy linkWidthBy} to determine link widths and interpolates them from {@link CosmographConfig.linkWidthRange linkWidthRange}. */ Count = "count", /** * Directly uses {@link CosmographConfig.linkWidthBy linkWidthBy} column values as widths. * - Treats numeric values in {@link CosmographConfig.linkWidthBy linkWidthBy} as link widths in pixels 1:1 without interpolation if they are numbers * - If {@link CosmographConfig.linkWidthByFn linkWidthByFn} exists, applies it to transform {@link CosmographConfig.linkWidthBy linkWidthBy} values into custom widths with it * - Falls back to {@link CosmographConfig.linkDefaultWidth linkDefaultWidth} if invalid width * - If neither {@link CosmographConfig.linkWidthBy} nor {@link CosmographConfig.linkWidthByFn} exist, sets all links width to {@link CosmographConfig.linkDefaultWidth linkDefaultWidth} */ Direct = "direct", /** * Sets all links width to the same value specified by {@link CosmographConfig.linkDefaultWidth linkDefaultWidth}. */ Single = "single" } export type LinkWidthStrategyType = `${LinkWidthStrategy}`; export declare const getActiveLinkWidthFn: (strategy: LinkWidthStrategyType, config: CosmographConfig, data: number[]) => SizeAccessorFn; /** * Determines the optimal width strategy for points based on the configuration and data summary. * * @param config - The configuration object of the Cosmograph. * @param pointsSummary - Optional summaries of points. * @returns The resolved {@link LinkWidthStrategyType} or `undefined` if using custom sizing */ export declare function resolveOptimalLinkWidthStrategy(config: CosmographConfig, dataColumnType?: DataType): LinkWidthStrategyType;