adobe / adobe/react-spectrum-charts

Longer ReferenceLine labels have unexpected positioning

Open
#670 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
127
Forks
29
Avg merge
7d 2h
Merged PRs (30d)
21

Description

### Provide a general summary of the issue here

If the ReferenceLine label is longer than other y-axis labels, it appears to overlap the y-axis line and is too close to the ReferenceLine itself.

Image

### 🤔 Expected Behavior?

The ReferenceLine label should appear and behave exactly as a y-axis label. We should be careful that ReferenceLine labels also never overlap with y-axis labels.

### 😯 Current Behavior

If the ReferenceLine label is longer than other y-axis labels, it appears to overlap the y-axis line and is too close to the ReferenceLine itself.

### 💁 Possible Solution

The ReferenceLine label should appear and behave exactly as a y-axis label. We should be careful that ReferenceLine labels also never overlap with y-axis labels.

See other ideas and discussion in Slack: https://adobedx.slack.com/archives/C05L126B17Y/p1764878083408519

### 🔦 Context

_No response_

### 🖥️ Steps to Reproduce

Use a ReferenceLine label that is longer than y-axis labels.

### Version

1.21.0

### What browsers are you seeing the problem on?

Chrome

### If other, please specify.

_No response_

### What operating system are you using?

MacOS

### 🧢 Your Company/Team

_No response_

### 🕷 Tracking Issue

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in Chrome with a ReferenceLine label longer than the y-axis labels, using the chart behavior described in the issue. Trace the ReferenceLine and y-axis label rendering entry points, then verify that the label aligns like a y-axis label and does not overlap the y-axis line, the ReferenceLine, or other y-axis labels.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.