Skip to content

Commit

Permalink
docs(API Guide): Add docs about the time buckets of the API
Browse files Browse the repository at this point in the history
fix #2
  • Loading branch information
nfroidure committed Mar 12, 2018
1 parent 95aa076 commit dc90101
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}
47 changes: 47 additions & 0 deletions pages/guide.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,53 @@ const Index = () => (
Check out the API reference for more
information.
</p>
<h2>Time buckets</h2>
<p>
Various measures are aggregated into time
buckets. The buckets are computed according
to the user&apos;s timezone per default.
Here are the various intervals you
may encounter:
</p>
<ul>
<li>
<strong>15m</strong>:
the bucket key will point the start of the
buckets with the first one beeing the first
15 minutes part of fours containing the given
start date,
</li>
<li>
<strong>30m</strong>:
the bucket key will point the start of the
buckets with the first one beeing the first
30 minutes part of fours containing the given
start date,
</li>
<li>
<strong>hour</strong>:
the bucket key will point the start of days
hours inside the given time interval,
</li>
<li>
<strong>week</strong>:
the bucket key will point the start of weeks
between the provided start and end dates
(starting on sunday),
</li>
<li>
<strong>month</strong>:
the bucket key will point the start of months
for each month between the provided start and
end dates,
</li>
<li>
<strong>year</strong>:
the bucket key will point the start of years
for each year between the provided start and
end dates.
</li>
</ul>
<h2>Units</h2>
<p>
The API returns values in fixed units.
Expand Down

0 comments on commit dc90101

Please sign in to comment.