React 3D Charts
Add 3D charts to React apps with @chartts/gl. Scatter3D, Surface3D, Globe3D, Bar3D, Line3D, and more. WebGL rendering with orbit controls, point picking, and smooth 60fps performance. Compatible with Next.js Server Components for SSR fallback. Full TypeScript types.
$
npm install @chartts/glexample.tsx
import { Scatter3D, Surface3D, Globe3D } from "@chartts/gl"
export function ResearchViz({ data }) {
return (
<div className="grid grid-cols-2 gap-4">
<div className="rounded-xl card p-6">
<Scatter3D
data={data.samples}
x="x" y="y" z="z"
colorBy="cluster"
className="h-96"
orbit
picking
onPointClick={(point) => console.log(point)}
/>
</div>
<div className="rounded-xl card p-6">
<Surface3D
data={data.surface}
x="longitude" y="latitude" z="elevation"
className="h-96"
colorScale="viridis"
wireframe={false}
orbit
/>
</div>
<div className="col-span-2 rounded-xl card p-6">
<Globe3D
data={data.locations}
lat="lat" lng="lng" value="revenue"
className="h-96"
autoRotate
markerClassName="fill-cyan-400"
/>
</div>
</div>
)
}Features
React components for 13 WebGL 3D chart types
Scatter3D, Surface3D, Globe3D, Bar3D, Line3D, Map3D, and more
Orbit controls: drag to rotate, scroll to zoom, right-click to pan
Point picking with onClick and onHover callbacks
Next.js compatible with SSR fallback rendering
TypeScript types for all 3D props and data shapes
Tailwind className on container and overlay elements