RuleChartThe RuleChart component displays a range or duration for each labeled item as a horizontal or vertical rule. It is suitable for visualizing time spans, data ranges, or active periods across categories.
labelOnYAxis (optional)booleanfalsetrue, the chart switches to horizontal mode and displays category labels along the Y-axis. Otherwise, labels appear on the X-axis with vertical rules.marks (required)Type:
Description: Defines the rules (lines or spans) to be drawn on the chart.
label: The category label or time unit (e.g., "Trees" or a Date).start: The numeric starting value of the rule.end: The numeric ending value of the rule.unit: (optional) The time unit, useful when the chart represents calendar-based data (e.g., .month, .day).Additional ChartMarkProps can be applied to customize visual styling:
foregroundStyle — Controls color or styleannotation — Adds annotation labelsopacity — Adjusts transparency