Skip to content

[charts] Support reference areas and dots as chart annotation primitives #21749

@josevsgeon

Description

@josevsgeon

Summary

Requesting a Reference Area feature for MUI X charts to allow shading/annotating rectangular regions, in addition to the existing Reference Line. See prior issue #10351 for background.

Reference Area functionality allows the visualization of chart regions (e.g. highlighting time ranges or value intervals) and is distinct from lines or points. This is commonly used to mark events, phases, or thresholds in analytic dashboards. An example is provided here: https://stackblitz.com/edit/j5vodwcm?file=src%2FExample.tsx (see screenshot below). This feature should not be restricted to line charts—reference areas can apply to any supported chart type.

Related reference objects in recharts:

Examples

Screenshot:

Reference area in chart example

The example shows a shaded region for "Pre-Launch" versus "Post-Launch". The request is to support referencing areas (along with lines and dots) anywhere on the chart axes.

Prior issue #10351 covered only reference lines.

Motivation

Direct support for ReferenceArea and similar features improves chart readability and is standard in charting libraries (see recharts for examples). Current workaround is manual and inconvenient when compared to built-ins for lines. Full reference support (lines, areas, dots) is requested for completeness.

Search keywords: reference area, reference line, reference dot, chart overlays, axes annotation, recharts ReferenceArea, recharts ReferenceDot, recharts ReferenceLine, chart region

Metadata

Metadata

Assignees

Labels

docsImprovements or additions to the documentation.scope: chartsChanges related to the charts.type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions