Skip to content

Render crosshair lines under chart content - #50

Merged
Federicocervelli merged 3 commits into
developmentfrom
fix/crosshair-under-series
May 28, 2026
Merged

Render crosshair lines under chart content#50
Federicocervelli merged 3 commits into
developmentfrom
fix/crosshair-under-series

Conversation

@Federicocervelli

Copy link
Copy Markdown
Owner

Summary

  • split crosshair DOM into line and overlay layers
  • keep line layer behind the WebGL canvas by default
  • keep labels and markers above chart content
  • clear the WebGL canvas transparently so chart background comes from the root layer

Tests

  • bun run typecheck
  • bun run test:visual
  • bun run pages:build

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b1132a9851

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/ui/ChartLayout.ts

this.canvas.style.position = "absolute";
this.canvas.style.inset = "0";
this.canvas.style.zIndex = "1";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep inside axis labels above the canvas

When an axis is configured with position: "inside", AxisOverlay appends its tick-label divs directly to chart.plotElement without assigning a z-index, so adding zIndex = "1" to the canvas puts the WebGL canvas above those labels in the plot stacking order. In that configuration the inside tick labels are now painted underneath grid/series pixels instead of overlaying the chart as before; give the inside-axis labels a z-index above the canvas or avoid raising the canvas above existing plot overlays.

Useful? React with 👍 / 👎.

@Federicocervelli
Federicocervelli merged commit 5d85ecc into development May 28, 2026
1 check failed
@Federicocervelli
Federicocervelli deleted the fix/crosshair-under-series branch May 28, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant