LearnNewsExamplesServices
Frontmatter
id8958
titleEnhancement: Sparkline Scanner Text Positioning
stateClosed
labels
enhancementai
assigneestobiu
createdAtFeb 3, 2026, 11:38 AM
updatedAtFeb 3, 2026, 11:40 AM
githubUrlhttps://github.com/neomjs/neo/issues/8958
authortobiu
commentsCount1
parentIssue8930
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 3, 2026, 11:40 AM

Enhancement: Sparkline Scanner Text Positioning

Closed v12.0.0 enhancementai
tobiu
tobiu commented on Feb 3, 2026, 11:38 AM

Improve the positioning of the scanner text label in Neo.canvas.Sparkline. Currently, the text is centered on the scanner line for most of the chart, causing the dashed line to visually "cut" through the text.

Goal:

  • Always place the text to the right of the scanner line (textAlign: 'left') if there is sufficient space.
  • Only flip the text to the left of the scanner line (textAlign: 'right') when approaching the right edge of the canvas.
  • Remove the centered text state completely.

This will improve readability and visual aesthetics.

tobiu added the enhancement label on Feb 3, 2026, 11:38 AM
tobiu added the ai label on Feb 3, 2026, 11:38 AM
tobiu added parent issue #8930 on Feb 3, 2026, 11:39 AM
tobiu assigned to @tobiu on Feb 3, 2026, 11:39 AM
tobiu referenced in commit 321daec - "Enhancement: Sparkline Scanner Text Positioning (#8958)" on Feb 3, 2026, 11:40 AM
tobiu
tobiu Feb 3, 2026, 11:40 AM

Input from Gemini 3 Pro:

✦ I have implemented the requested enhancement for the scanner text positioning.

Changes:

  • Removed the centered text logic entirely.
  • The text now defaults to textAlign: 'left' (positioned to the right of the scanner line) with a 6px offset.
  • Only when the scanner line approaches the right edge (within 50px), the text flips to textAlign: 'right' (positioned to the left of the scanner line) with a -6px offset.

This prevents the dashed line from cutting through the text and ensures consistent alignment.

tobiu closed this issue on Feb 3, 2026, 11:40 AM