Sheetwrite

CAPABILITY / ANALYSIS

Pivot it, chart it, then change the data

A pivot table and a live chart over two years of orders. Edit any order and both update in place. Everything here is the public API.

Data
4,800 orders, 24 months
Pivot
Revenue by month and region
Packages
@sheetwrite/formulas, @sheetwrite/charts
Larkspur Workspace / Orders 2025–2026.xlsx

Try it

  1. Find the dipRead the EMEA line in the Summary chart.It falls in March 2026, after a 8% price rise, and recovers in part.
  2. Edit an orderGo to an EMEA order from March 2026, type a new revenue and press Enter.The pivot's total for that month and the chart move together.
  3. Rearrange the pivotSelect a cell in the pivot to open its field list. Move Product to Rows with the field's actions menu.The pivot regroups. Halo screen starts in July 2025. Undo puts it back.
  4. Insert a chartSelect some of the pivot's months and regions, then open the arrow on Insert › Chart and pick Line.A line chart of your selection appears, and its panel changes the kind and titles.
  5. Move a chartSelect a chart, then drag it or use the arrow keys. Right-click it to edit or delete it.Each move is one undo step.

How it is built

// Pivot tables need the full engine; charts draw through their package
await initSheetwrite(undefined, await import("@sheetwrite/formulas"));
registerChartsBackend();
grid.setPivot({ id, source, anchor,
rows: [MONTH], columns: [REGION],
values: [{ field: REVENUE, aggregation: "SUM" }] }, "summary");
// One line series per region, over the pivot's output cells
grid.setChart({ id, kind: "line", series, anchor }, "summary");

The chart reads cells, not the pivot: point it at any range, and it redraws when those cells change.

Keyboard

Enter
Open the selected chart's panel
←→↑↓
Move the chart by one pixel
Shift↓
Move the chart by one cell
Delete
Remove the chart
Esc
Return to the grid