RuleLineForLabelChart
RuleLineForLabelChart overlays vertical or horizontal reference lines based on label (or date) positions in a chart. It is commonly used to highlight specific categories or time points in combination with other chart types, such as BarChart or LineChart.
Declaration
Properties
Each item in marks can include:
label: The string or date at which to draw the rule.unit: Optional, only relevant for date-based axes.foregroundStyle: Optional. Controls the color.opacity: Optional. Controls line transparency.lineStyle: Optional. Allows custom dashing (e.g.,[3, 2]).
Example: Marking Categories in a Bar Chart
Use Cases
- Highlight important events or milestones in a timeline.
- Visually separate regions in a categorical chart.
- Indicate thresholds or labels of significance.
