import * as d3 from 'd3'; /** * Energy source data structure matching Kendo UI format */ export interface EnergySource { /** Display name of the energy source */ name: string; /** Hex color code for visualization */ color: string; /** Array of values corresponding to each year */ data: number[]; /** Opacity value (0-1) */ opacity: number; } /** * Chart data format as received from JSON files * Matches the current Kendo UI data structure */ export interface ChartDataFormat { /** First object contains array of years */ year: number[]; /** Additional objects are energy sources */ [index: number]: EnergySource | number[]; } /** * Raw data format as it comes from JSON files */ export type RawChartData = Array<{ year?: number[]; } & EnergySource>; /** * Processed data point for D3 consumption */ export interface ProcessedDataPoint { /** Year value */ year: number; /** Dynamic properties for each energy source */ [energySource: string]: number; } /** * Stacked data point with D3 stack layout data */ export interface StackedDataPoint extends d3.SeriesPoint { /** Original data point */ data: ProcessedDataPoint; /** Energy source key */ key?: string; } /** * Chart display modes */ export type ChartMode = 'fuel' | 'sector'; /** * Data representation types */ export type DataRepresentation = 'fractional' | 'perCapita' | 'total'; /** * Energy source names as constants */ export type EnergySourceName = 'Solar' | 'Nuclear' | 'Water' | 'Wind' | 'Geothermal' | 'Natural Gas' | 'Coal' | 'Biomass' | 'Petroleum'; /** * Chart bounds for rendering calculations */ export interface ChartBounds { width: number; height: number; innerWidth: number; innerHeight: number; } /** * Multi-dataset format containing all 6 data variants * This is the new primary data format for the library */ export interface MultiDatasetFormat { 'fuel-fractional': RawChartData; 'fuel-perCapita': RawChartData; 'fuel-total': RawChartData; 'sectoral-fractional': RawChartData; 'sectoral-perCapita': RawChartData; 'sectoral-total': RawChartData; } /** * Type for dataset keys in MultiDatasetFormat */ export type DatasetKey = keyof MultiDatasetFormat; //# sourceMappingURL=DataTypes.d.ts.map