Skip to content

BoxPlotExample: YAxis auto-scaling clips top whisker due to ErrorBar ranged values not extending domain #7134

@coderabbitai

Description

@coderabbitai

Summary

The BoxPlotExample added in #7130 renders a clipped top whisker for category C (which has max: 49). When a ranged Bar uses ErrorBar, the axis domain is not extended to account for the whisker values, so the YAxis auto-scaling stops short and the upper whisker is clipped.

Reproduction

See the BoxPlotExample in www/src/docs/exampleComponents/BarChart/BoxPlotExample.tsx (introduced in #7130). The whiskerDataKey computes [q3 - min, max - q3] error values, but these do not expand the YAxis domain beyond the ranged bar's upper bound (q3).

Expected behavior

The YAxis domain should be extended to cover the full whisker range (i.e., up to max: 49 for category C), so all whiskers are fully visible.

Temporary workaround (docs side)

Pin the domain manually on YAxis:

<YAxis width=auto domain={[0, 50]} />

Related

Requested by @PavelVanecek.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions