Server-Side Data
With server-side Pivot Charts, your backend calculates the report values and the browser draws them. The chart asks for the groups it needs, independently of the rows currently displayed in the table.
For example, the table might display one page of regions while a chart compares every product category inside North. Start by connecting the table in Server-Side Pivot, then add the chart provider below.
Try it: choose Drill North to load a nested group, Fail next request to simulate a request error, then Retry valid request to recover. The provider must return all members required by each chart frame. The live backend is simulated in this page; the integration code shows where your HTTP service belongs.
Simulated chart providers
Load chart data through a simulated server, then explore delay, failure, cancellation, and retry.
A server-side Pivot loads a window of an analytical report for the grid. A chart often needs a different scope: for example, every immediate child of North → Retail, rather than the rows currently visible in the grid.
A remote Pivot viewport is only a window into the analytical result. Pivot
Charts never treat the visible rows or columns as the complete dataset.
Configure PivotChartDataProvider to return the complete immediate-child frame
for every requested semantic scope.
Pivot Charts consume the report’s committed aggregate values. Configure numeric/scalar eligibility, counts and execution pins in the Pivot aggregation contract. Chart normalization, formatting or a shared dataset shape does not establish identical local/server results or increase arithmetic precision. A remote provider must supply complete aggregates under its backend policy, not averages or distinct totals reconstructed from a visible page.
Choose the read contract
Section titled “Choose the read contract”| Need | Provider entry point | Required result |
|---|---|---|
| A complete chart for a root or drill scope | load(request, { signal }) | Every immediate child and requested series for that semantic scope, with complete counts. |
| Numeric/time navigation over a large source | Opt in with capabilities.viewport and implement loadViewport | A frame complete for the requested window, exact window/purpose echoes and stable full-source domain. |
These contracts are explicit. A partial grid page never becomes a complete chart by being passed to load. Read Viewport Data before implementing a windowed provider.
Configure a provider
Section titled “Configure a provider”import { createPivotChartsRenderer } from '@revolist/pivot';
grid.pivotCharts = { renderer: createPivotChartsRenderer(), dataProvider: { async load(request, { signal }) { const response = await fetch('/api/pivot/chart-data', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(request), signal, });
if (!response.ok) { throw new Error(`Chart data failed: ${response.status}`); } return response.json(); }, },};The provider is used for root projection, explicit scoped data, linked
refreshes, and drill frames. Local and server Pivots produce the same
PivotChartDataset contract after projection and validation.
Integration steps
Section titled “Integration steps”- Build a provider using the committed Pivot request and its abort signal.
- Return the complete response contract and preserve all semantic identities.
- Configure Query freshness, sharing and lifecycle for remote reads.
- Choose limits and rendering budgets that match your workload.
- Test root, drill, retry, breadcrumb and stale-response paths before release.
The examples use an in-memory simulated analytical provider. Replace its computation with your authenticated backend; they do not deploy a server or demonstrate production data access.
Production checklist
Section titled “Production checklist”- Return complete immediate-child frames from the analytical engine.
- Preserve stable field, category, series, hierarchy, and path identities.
- Echo the request ID and semantic scope exactly.
- Forward abort signals to network and query work.
- Set limits that match renderer and server budgets.
- Include formatted display values when chart and Pivot formatting must match.
- Log provider errors with request/view IDs without exposing raw sensitive source rows.
- Exercise root, linked refresh, drill, retry, breadcrumb, and stale-response paths before release.
Next steps
Section titled “Next steps”See your first chart, data and measures and the API reference.