import type { ScaleOrdinal, ScaleSequential, ScaleThreshold } from '@mui/x-charts-vendor/d3-scale'; import { type ContinuousColorConfig, type OrdinalColorConfig, type PiecewiseColorConfig } from "./colorMapping.js"; import { type DatasetElementType } from "./seriesType/config.js"; export interface ZAxisConfig { id: string; data?: readonly V[]; /** * The key used to retrieve `data` from the `dataset` prop. */ dataKey?: string; /** * A function to extract and transform the value from the `dataset` item. * It receives the full dataset item and should return the axis value. * Can be used as an alternative to `dataKey`. * @param {DatasetElementType} item The full dataset item. * @returns {V} The transformed value. */ valueGetter?: (item: DatasetElementType) => V; /** * The minimal value of the scale. */ min?: number; /** * The maximal value of the scale. */ max?: number; colorMap?: OrdinalColorConfig | ContinuousColorConfig | PiecewiseColorConfig; } export interface ZAxisDefaultized extends ZAxisConfig { colorScale?: ScaleOrdinal | ScaleOrdinal | ScaleSequential | ScaleThreshold; }