Skip to content
Source
Sign inSign up
TanStack/charts

feat(react): add optional 3D city map #238

Openraphox(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/238/headopened

Add an opt-in React city renderer that encodes metrics as building heights, category intersections as districts, and health status as building effects. Records retain their identity through the existing mark, scene, renderer, focus, and selection contracts.

image

Reference: https://raphox.github.io/atlas/

  • Expose the city capability from @tanstack/react-charts/city, mirrored at @tanstack/charts/react/city, with an optional Three.js peer.
  • Own scoped presentation in the renderer, preserving sideEffects: false and the ordinary chart entry points. Consumers import the component without a separate stylesheet.
  • Render the normal semantic SVG scene for SSR and WebGL initialization failure; the WebGL canvas paints the interactive city above that scene.
  • Register benchmarks/conformance/cases/city-map with the standard case.json, self-contained example.tsx, typed data, tanstack.ts, isolated Plot reference, and package/case regressions.
  • Use the shared React mount and definition-only preview helpers. The live catalog displays the WebGL map and source; compact previews and the Plot comparison use its semantic district layout.
  • Document the capability in the mark reference and existing maps/spatial guide, with the regular catalog embed, navigation, metadata index, preview, and coverage inventories.
  • Keep regression tests alongside the package and use the existing Vitest, conformance, documentation, and packaging commands.

The internal Atlas engine remains JavaScript behind explicit TypeScript public contracts. This draft requests feedback on the API and package placement. The Atlas code is offered under the repository's MIT license with authorization to distribute it.

Validation:

  • Main Vitest suite: 306 files / 2,300 tests passed.
  • TypeScript, public callback, source-example, catalog index, documentation, formatting, and diff contracts passed.
  • Standard first-party conformance matrix passed. The scoped Plot comparison passed with clean types and matching semantic geometry/paints.
  • Chromium catalog check passed with WebGL, camera controls, and source display, with no page errors.
  • Installed tarball runtime/declaration checks passed, including React 18 SSR without warnings, React Native/Expo, framework adapters, and the unified city entry.
  • Catalog previews generated and checked with the existing catalog tooling.

To try locally, run pnpm dev:conformance and open /charts/city-map/.

    1. Important

      Draft PR not reviewed

      Draft PRs are not automatically reviewed by default.

      • Trigger a manual review

      To automatically review draft PRs, update your CodeRabbit configuration:

      reviews:
        auto_review:
          drafts: true
      • 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
      Comment `@coderabbitai help` to get the list of available commands.
    2. changeset-bot[bot](GitHub profile, opens in a new tab)commented

      🦋 Changeset detected

      Latest commit: 70bf7ae10dbd6fe7423bcaef8dffb997e80f25f2

      The changes in this PR will be included in the next version bump.

      This PR includes changesets to release 12 packages
      NameType
      @tanstack/react-chartsMinor
      @tanstack/chartsMinor
      @tanstack/alpine-chartsMinor
      @tanstack/angular-chartsMinor
      @tanstack/lit-chartsMinor
      @tanstack/octane-chartsMinor
      @tanstack/preact-chartsMinor
      @tanstack/react-native-chartsMinor
      @tanstack/solid-chartsMinor
      @tanstack/svelte-chartsMinor
      @tanstack/vue-chartsMinor
      @tanstack/charts-scalesMinor

      Not sure what this means? Click here to learn what changesets are.

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

    3. socket-security[bot](GitHub profile, opens in a new tab)commented

      Review the following changes in direct dependencies. Learn more about Socket for GitHub.

      Diff Package Supply Chain
      Security
      Vulnerability Quality Maintenance License
      Addedthree@​0.180.0981009892100

      View full report

Sign in to join this conversation.