import { ClusterConfig } from '../../../cluster/models/config.models'; import { AttributeMap } from '../../../model/models/attribute-map.models'; import { CurrencyTools, RangeItem, RangeLegend, RangeLegendItem } from '../../../model/models/legend.models'; import { NumericUnit } from '../../../model/models/unit.models'; import { NumericViewConfig } from '../../../model/models/view-config.models'; import { ViewAggregation } from '../../models/aggregation.models'; /** * Computes range legend using smart bucket calculation that adapts to data distribution. * * @param data - Original data to analyze * @param cluster - Cluster configuration * @param config - View configuration * @param adjustedViewAggregation - Optional view aggregation setting * @returns Range legend and aggregation */ export declare function computeRangeLegend(data: AttributeMap[], cluster: ClusterConfig[], config: NumericViewConfig, adjustedViewAggregation?: ViewAggregation, currencyTools?: CurrencyTools): { legend: RangeLegend; aggregation?: ViewAggregation; }; /** * Creates logarithmic buckets with nice, rounded boundaries and range-formatted labels. * Uses range format (min - max) for better readability and handles non-positive values appropriately. * Supports currency formatting when currency tools are provided with currency settings. * * @param max - Maximum range item with value, label, and background color * @param min - Minimum range item with value, label, and background color * @param steps - Number of buckets to create * @param symbol - Unit symbol to append to labels (e.g., '%', '$') * @param currencyTools - Optional currency tools containing currency and locale settings for formatting * @returns Array of range legend items with rounded logarithmic distribution and range labels */ export declare function computeRoundedLogarithmicRanges(max: RangeItem, min: RangeItem, steps: number, symbol: string, currencyTools?: CurrencyTools): RangeLegendItem[]; /** * Creates linear buckets with nice, rounded boundaries and range-formatted labels. * Uses interpolated colors and range format (min - max) for better visual separation and readability. * Supports currency formatting when currency tools are provided with currency settings. * * @param max - Maximum range item with value, label, and background color * @param min - Minimum range item with value, label, and background color * @param steps - Number of buckets to create * @param symbol - Unit symbol to append to labels (e.g., '%', '$') * @param currencyTools - Optional currency tools containing currency and locale settings for formatting * @returns Array of range legend items with rounded linear distribution and range labels */ export declare function computeRoundedLinearRanges(max: RangeItem, min: RangeItem, steps: number, symbol: string, currencyTools?: CurrencyTools): RangeLegendItem[]; /** * Creates legend ranges based on actual data distribution with user-friendly range labels. * Uses currency formatting when currency tools are provided and no unit symbol is specified. * * This function analyzes data points to create appropriate range buckets for visualization * with these key characteristics: * - Uses inclusive lower bounds and exclusive upper bounds (e.g. "5 to <10") for non-overlapping ranges * - Creates buckets with nice rounded boundaries (10, 100, 1000) rather than arbitrary values * - Ensures all buckets contain actual data points (no empty buckets) * - Adapts to data distribution using logarithmic or linear scale as appropriate * - Formats labels using compact notation (e.g., "€0 - <€250K", "€250K+") for readability * * @param max - Maximum range item with value, label, and background color * @param min - Minimum range item with value, label, and background color * @param symbol - Unit symbol to append to labels (e.g., '%', '$') * @param dataPoints - Array of numeric data points to analyze for bucket creation * @param currencyTools - Optional currency tools for formatting monetary values * @param unit - Optional numeric unit type for special handling (e.g., 'percentage') * @returns Array of range legend items with appropriate distribution and range labels */ export declare function computeSmartLegendRanges(max: RangeItem, min: RangeItem, symbol: string, dataPoints: number[], currencyTools?: CurrencyTools, unit?: NumericUnit): RangeLegendItem[]; /** * Creates meaningful bucket boundaries based on data distribution. * * Creates boundaries like 10, 100, 1000 or 5, 10, 50, 100 rather than * arbitrary values like 21,600. For percentage units, ensures standard * percentage buckets (0, 20, 40, 60, 80, 100) are always included, with * special handling to guarantee a 100% boundary exists. * * @param points - Sorted array of data points * @param minValue - Minimum value in the range * @param maxValue - Maximum value in the range * @param maxBuckets - Maximum number of buckets to create * @param unit - Optional numeric unit type for special handling (e.g., 'percentage') * @returns Array of boundary values */ export declare function createMeaningfulBucketRanges(points: number[], minValue: number, maxValue: number, maxBuckets: number, unit?: NumericUnit): number[];