Concepts
Server rendering
The three adapters render on the server without touching the DOM and hydrate without a mismatch: the drawing is deterministic, so server and client draw the same strokes.
Per framework
| Framework | How |
|---|---|
| React / Next.js | Default subpaths are client components; @silverpoint/react/server/<chart> renders pure SVG in a Server Component. |
| Vue | @vue/server-renderer with createSSRApp; Nuxt consumes it like any Vue app (not a validated integration). |
| Angular | @angular/ssr with outputMode 'server'; the example app is server-rendered in CI. |
| Reflex | Charts render on the client; a static export (reflex export --frontend-only) works, as this site shows. |
In your code
// app/page.tsx — a React Server Component (Next.js App Router)
import '@silverpoint/fonts/fonts.css';
import '@silverpoint/grounds/styles.css';
import { LineChart } from '@silverpoint/react/server/line-chart';
const data = [
{ hour: '00', hits: 18 },
{ hour: '12', hits: 64 },
{ hour: '20', hits: 30 },
];
export default function Page() {
return <LineChart id="hits" width={480} height={160} data={data} xKey="hour" valueKey="hits" title="Hits per hour" />;
}// entry-server.ts
import { createSSRApp } from 'vue';
import { renderToString } from 'vue/server-renderer';
import { provideSilverpoint } from '@silverpoint/vue';
import App from './App.vue';
export function render(): Promise<string> {
return renderToString(createSSRApp(App).use(provideSilverpoint({ locale: 'en' })));
}# Angular CLI with @angular/ssr: nothing silverpoint-specific to configure.
ng add @angular/ssr
# angular.json: "outputMode": "server"
npm run build && node dist/my-charts/server/server.mjs# Reflex compiles your pages to a React app; the charts render on the client.
reflex export --frontend-only # a static build, as this site is deployed on Vercel