Skip to content
Source
Sign inSign up
TanStack/charts

docs: explain live renderer surface getters #253

Mergedtannerlinsleymerged 1 commit intomain fromtaren/docs-surface-getters-2113merged by tannerlinsley

tannerlinsleycommented

A renderer surface can expose element as a live getter before its root exists. Spreading that surface while wrapping it reads the getter during mount and can throw or keep a stale element.

The custom-renderer reference now tells wrapper authors to read the element after the initial render and forward the getter. The package documentation is generated from the root docs, and the observed friction is recorded under F-294.

Validation: checked the SVG getter and host mount/render order, exercised deferred/changing roots in a private wrapper wiring check, and passed formatting, whitespace and canonical/generated documentation synchronization. This is prose only, with no runtime, dependency, workflow or budget changes.

Summary by CodeRabbit

  • Documentation
    • Clarified that a chart’s rendered element may become available or change after the initial render.
    • Added guidance for reading and forwarding the element when wrapping a chart surface.
    1. ⚠️ No Changeset found

      Latest commit: ab835a57e53cb910871fe94f2b6613b106514a5f

      Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

      This PR includes no changesets

      When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

      Click here to learn what changesets are, and how to add one.

      Click here if you're a maintainer who wants to add a changeset to this PR

    2. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      No actionable comments were generated in the recent review.

      Walkthrough

      The rendering reference documentation and F-294 follow-up now describe live ChartSurface.element getter timing, the effects of spreading a surface, and getter forwarding in wrappers.

      Changes: ChartSurface element guidance

      Layer / File(s)Summary
      Document live element getter behavior
      docs/reference/rendering-and-export.md, packages/charts-core/docs/reference/rendering-and-export.md, API-FRICTION.md
      The reference docs advise reading element after the initial render and forwarding it through a getter. They explain that spreading evaluates the getter immediately, which can throw before rendering or cache an element that the renderer later replaces. The F-294 follow-up records the clarification and verification.

      Estimated code review effort: 1 (Trivial) | ~4 minutes

      Change: Other

      Merge Risk: Minimal · up to ab835

      The documentation clarification is synchronized across the documented surfaces and is ready to merge.

      Pre-merge checks: Passed 5
      Check nameStatusExplanation
      Description CheckPassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title checkPassedThe title clearly and concisely describes the documentation change about live renderer surface getters.
      Docstring CoveragePassedNo eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Docstring Coverage

      Explanation

      No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

      Finishing Touches
      Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      Share

      CodeRabbit Verify

      • Run CodeRabbit Verify to test the changes in this pull request.
      Recent review info
      Run configuration
      • Source mode: Auto
      • Repository: Unavailable
      • Branch: Unavailable
      • File: No configuration file from this repository applied
      • Commit: Unavailable
      • Layers: defaults
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 478e5473-1313-4c78-b120-981479ce9889
      Commits

      Reviewing files that changed from the base of the PR and between bd5dacc56699cdefffed3bced259d39a73ce5f54 and ab835a57e53cb910871fe94f2b6613b106514a5f.

      Files selected for processing: 3
      • API-FRICTION.md
      • docs/reference/rendering-and-export.md
      • packages/charts-core/docs/reference/rendering-and-export.md

      Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

    3. View your CI Pipeline Execution ↗ for commit ab835a57e53cb910871fe94f2b6613b106514a5f

      CommandStatusDurationResult
      nx run-many --targets=format-check,docs-check,d...✅ Succeeded52sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-11-03 21:35:48 UTC

    4. tannerlinsley merged this2892ebf

    5. tannerlinsley closed this

Sign in to join this conversation.