Time taken to complete graph

Don't you want them associated with the x or y axis then rather than the
module?


On Fri, Jul 4, 2014 at 3:51 PM, Leonard Martin <notifications@github.com>
wrote:

> In app/support/stagecraft_stub/responses/carers-allowance.json:
>
> > +        "type": "duration",
> > +        "unit": "s"
> > +      },
> > +      "axes": {
> > +        "x": {
> > +          "label": "Date",
> > +          "key": ["_start_at", "_end_at"],
> > +          "format": "dateRange"
> > +        },
> > +        "y": [
> > +          {
> > +            "label": "Average session time",
> > +            "format": {
> > +              "type": "duration",
> > +              "unit": "s"
> > +            }
>
> I'd be tempted to go the other way, which would be to have format as a
> top-level property, which can be overridden on a case-by-case basis by the
> axes, but is inherited from the root if undefined. At the moment, the
> only real time we have different formats for different axes is for tables -
> for graphs the data is almost by definition in the same format.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/alphagov/spotlight/pull/627/files#r14562345>.
>