import { ViewAggregation } from '../../view/models/aggregation.models'; import { LegendItem, RangeLegendItem } from './legend.models'; import { NumericUnit } from './unit.models'; /** * The colouring configuration for a dimension. * Tells the library how to assign colours to fact sheets when this dimension is chosen as the "colour by" attribute. * Each variant handles a different field type (string single-select, lifecycle phases, numeric ranges, location, etc.). */ export declare type ViewConfig = StringViewConfig | LifecycleViewConfig | NumericViewConfig | StringListViewConfig | StatusViewConfig | LocationViewConfig; export declare enum ViewStrategyType { String = "string", Lifecycle = "lifecycle", Numeric = "numeric", StringList = "stringList", Status = "status", Location = "location" } export interface StringViewConfig { type: ViewStrategyType.String; attribute: string; multiplicity: 'single' | 'multi'; aggregation?: ViewAggregation; legend: Record; } export interface LifecycleViewConfig { type: ViewStrategyType.Lifecycle; attribute: string; legend: Record; } export interface NumericViewConfig { type: ViewStrategyType.Numeric; attribute: string; multiplicity: 'single' | 'multi'; aggregation?: ViewAggregation; range: NumericFieldRange; legend?: RangeLegendItem[]; unit?: NumericUnit; } export interface StringListViewConfig { type: ViewStrategyType.StringList; attribute: string; legend: Record; } export interface StatusViewConfig { type: ViewStrategyType.Status; attribute: string; legend: Record; } export interface LocationViewConfig { type: ViewStrategyType.Location; attribute: string; level: 'continent'; } export interface NumericFieldRange { min: NumericFieldRangeItem; max: NumericFieldRangeItem; } export interface NumericFieldRangeItem { bgColor: string; value?: number; }