Write and check a model › Build data apps › Stepped pivot

Write and check a model › Build data apps

Stepped pivot

Units built and scrapped, product by product, a column per quarter, then a column per month. The filter bar is the editor: every pivot follows it. It does the job of the anfra Step Table.

archec new my-app --kind data-app --template stepped-pivot
archec ui preview my-app/main.arche --serve

What it shows#

  • A filter bar: a line, a product, a quarter.
  • Three tiles: built, scrapped, yield.
  • Built by product and quarter, then by product and month, and the yield by line and month. Each has its totals and Export CSV.
  • Built by month, a bar per product.

The data#

  • data/production.csv: a row per line, product and working day: at, quarter, month, line, product, built, scrapped.

Limits#

  • A pivot spreads a field of the rows: the quarter and the month are columns of the data, not cut from the date.
  • A yield's totals are averaged, not added.

The model is lib/data-apps/stepped-pivot/main.arche, and the gallery lists the other templates.