Écrire et vérifier un modèle › Construire des applications de données › Chart dice

Écrire et vérifier un modèle › Construire des applications de données

Cette page n’est pas encore traduite : voici la version anglaise.

Chart dice

Four dice: a metric, a dimension, a filter and a grain. Roll them for a chart nobody thought to draw; keep a die and roll the others. It does the job of the anfra Data Dice app.

archec new my-app --kind data-app --template chart-dice
archec ui preview my-app/main.arche --serve

What it shows#

  • canvas roll "Roll a chart" { dice Telemetry }: the dice, each with keep, the roll button, and the chart they make. By time it is a line at the grain, else a bar.
  • Three tiles under it.

The first roll is the same on every page (it is seeded by the element), so a picture of the screen does not change. The next rolls are random.

The data#

  • data/telemetry.csv: every two hours for a month, per board and site: at, board, site, firmware, motor_temp, current, rpm, faults.

Limits#

  • The grain die picks among the grains that give 4 to 120 points over the rows.
  • The filter die keeps one value of one dimension.

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