Get a query range appropriate for a given aggregate level.
Returns an object with start and end Date properties, using the given endDate
parameter as the basis for calculating the start as an offset backwards in time
based on the given aggregate level.
The aggregateTimeCount will be treated as a "next higher" aggregate level from
aggregate, like this:
< Hour: numHours
Hour : numDays
Day : numMonths
Month : numYears
For example, you might like to render a chart using TenMinute aggregate data for the
last 24 hours. You'd call this function like this:
Get a query range appropriate for a given aggregate level.
Returns an object with
startandendDate properties, using the givenendDateparameter as the basis for calculating the start as an offset backwards in time based on the givenaggregatelevel.The
aggregateTimeCountwill be treated as a "next higher" aggregate level fromaggregate, like this:Hour:numHoursHour:numDaysDay:numMonthsMonth:numYearsFor example, you might like to render a chart using
TenMinuteaggregate data for the last 24 hours. You'd call this function like this: