The RectChart
component renders a bar-like rectangular chart that visualizes value-based data associated with labels. It is similar in usage to BarChart
and uses the same BarChartProps
interface.
labelOnYAxis
(optional)boolean
false
true
, the labels will appear along the Y-axis and the chart will display as horizontal bars. If false
, labels are on the X-axis with vertical bars.marks
(required)Array<{ label: string | Date; value: number; unit?: CalendarComponent } & ChartMarkProps>
mark
object fields:label
: The category label shown on the axis (e.g., “Cube”).value
: The numeric value determining the height or width of the rectangle.unit
: (Optional) A calendar unit used for time-based data.You may also use optional visual properties inherited from ChartMarkProps
, such as:
foregroundStyle
cornerRadius
annotation
opacity