# Charts on a report

A report can carry measurements, and the site plots them: one chart per series, on the report's
page, with the exact value under the cursor. This is the shape of what a game sends. Sending a report
at all is described in [sending](sending), and reading one back in [reading](reading).

A file part sent as `charts` is plotted on the report's page, one chart per series. Send several
and each is plotted. It is JSON:

```json
{
  "t": [0.0, 1.02, 2.05, 3.01],
  "series": {
    "Graphics.FramesPerSecond": [60, 59, 12, 58],
    "Memory.MonoUsedSizeInMegabytes": [210, 211, 240, 241]
  },
  "notes": {
    "Graphics.FramesPerSecond": [null, null, { "chunk": "3,-2", "why": "terrain regen" }, null]
  }
}
```

`t` is the x axis - seconds since the game started, one entry per sample. Every array in `series`
is the y axis for one chart, as long as `t`, and the name is whatever you call it: the page draws
what it is given and keeps no list. Samples need not be evenly spaced; a stall that covers ten
seconds is one sample ten seconds wide.

`notes` is optional, and optional per point. Beside each series it may carry an array as long as
the series, and whatever is at an index is shown in a tooltip when that point is hovered, under the
point's exact x and y. An entry can be a string, an array of strings (one line each), or an object
(one `name value` line per field). `null`, or nothing, means there is nothing to say about that
reading - which is most of them - and the tooltip shows the position alone.

`metrics` is the older name for this field and still works, because the two games in players'
hands send it. Anything new should send `charts` - see [sending](sending) for the whole set of
attachment fields.

Say what a reader of the chart could not work out from the line. "chunk (3,-2) regenerated" on the
frame that dropped is worth having; the frame rate on every point is not, because the chart is
already that.
