Skip to main content

IDataMatrixProps

@spartanfx/react v1.2.2


@spartanfx/react / index / IDataMatrixProps

Interface: IDataMatrixProps

Props for the DataMatrix component

Properties

Required

PropertyTypeDescription
aggregationTypeAggregationTypeAggregation mode: count or sum
itemsRecord<string, unknown>[]Array of data records to pivot
xFieldstringField name to use for row headers (x-axis)
yFieldstringField name to use for column headers (y-axis)

Options

PropertyTypeDescription
aggregationField?stringAggregation field: numeric field to use for aggregation Ignored if aggregation type is set to 'count'
blankLabel?stringLabel for blank/missing values (default: "(Blank)")
showTotals?booleanWhether to show row/column totals and grand total (default: true)
xFieldLabel?stringDisplay label for the x-axis (rows). Falls back to xField if not provided
yFieldLabel?stringDisplay label for the y-axis (columns). Falls back to yField if not provided

Events & callbacks

PropertyTypeDescription
formatValue?(value) => stringCustom formatter for cell values

Appearance & theming

PropertyTypeDescription
appearance?AppearanceModeAppearance mode: light or dark
className?stringCustom class name for the container
tokens?IDataMatrixTokensCustomization tokens for styling