import type { CSSProperties } from 'react'; import type { LabelProps, YAxisProps } from 'recharts'; import type { IChartBaseProps } from '../../interfaces/IChartBaseProps.js'; import type { IChartDimension } from '../../interfaces/IChartDimension.js'; import type { IChartMeasure } from '../../interfaces/IChartMeasure.js'; interface MeasureConfig extends IChartMeasure { /** * Column Width */ width?: number; /** * Column Opacity */ opacity?: number; /** * column Stack ID * @default undefined */ stackId?: string; /** * Highlight color of defined elements * @param value {string | number} Current value of the highlighted measure * @param measure {IChartMeasure} Current measure object * @param dataElement {object} Current data element */ highlightColor?: (value: number, measure: MeasureConfig, dataElement: Record) => CSSProperties['color']; } interface DimensionConfig extends IChartDimension { /** * Interval of axis label */ interval?: YAxisProps['interval']; } export interface ColumnChartProps extends IChartBaseProps { /** * Alignment of the labels of the data points. * * @default 'insideTop' */ alignLabels?: LabelProps['position']; /** * An array of config objects. Each object will define one dimension of the chart. * * **Required Properties** * - `accessor`: string containing the path to the dataset key the dimension should display. Supports object structures by using 'parent.child'. * Can also be a getter. * * **Optional Properties** * - `formatter`: function will be called for each data label and allows you to format it according to your needs * - `interval`: number that controls how many ticks are rendered on the x axis * */ dimensions: DimensionConfig[]; /** * An array of config objects. Each object is defining one column in the chart. * * **Required properties** * - `accessor`: string containing the path to the dataset key this column should display. Supports object structures by using 'parent.child'. * Can also be a getter. * * **Optional properties** * * - `label`: Label to display in legends or tooltips. Falls back to the accessor if not present. * - `color`: any valid CSS Color or CSS Variable. Defaults to the `sapChart_Ordinal` colors * - `formatter`: function will be called for each data label and allows you to format it according to your needs * - `hideDataLabel`: flag whether the data labels should be hidden in the chart for this column. * - `DataLabel`: a custom component to be used for the data label * - `width`: column width, defaults to `auto` * - `opacity`: column opacity, defaults to `1` * - `stackId`: columns with the same stackId will be stacked * - `highlightColor`: function will be called to define a custom color of a specific element which matches the * defined condition. Overwrites code>color of the element. * */ measures: MeasureConfig[]; } /** * A `ColumnChart` is a data visualization where each category is represented by a rectangle, with the height of the rectangle being proportional to the values being plotted. * * __Note:__ Charts are custom-built __without__ defined design specifications! They use the Fiori color palette, but functionality and especially accessibility may not meet standard app requirements. */ declare const ColumnChart: import("react").ForwardRefExoticComponent>; export { ColumnChart };