interval.offset()

interval.offset(date[, step]) Returns a new date equal to date plus step intervals. If step is not specified it defaults to 1. If step is negative, then the returned date will be before the specified date; if step is zero, then a copy of the specified date is returned; if step is not an integer, it is floored. This method does not round the specified date to the interval. For example, if date is today at 5:34 PM, then timeDay.offset(date, 1) returns 5:34 PM tomorrow (even if daylight saving

interval.floor()

interval.floor(date) Returns a new date representing the latest interval boundary date before or equal to date. For example, timeDay.floor(date) typically returns 12:00 AM local time on the given date. This method is idempotent: if the specified date is already floored to the current interval, a new date with an identical time is returned. Furthermore, the returned date is the minimum expressible value of the associated interval, such that interval.floor(interval.floor(date) - 1) returns the

interval.filter()

interval.filter(test) Returns a new interval that is a filtered subset of this interval using the specified test function. The test function is passed a date and should return true if and only if the specified date should be considered part of the interval. For example, to create an interval that returns the 1st, 11th, 21th and 31th (if it exists) of each month: var i = d3.timeDay.filter(function(d) { return (d.getDate() - 1) % 10 === 0; }); The returned filtered interval does not support co

interval.every()

interval.every(step) Returns a filtered view of this interval representing every stepth date. The meaning of step is dependent on this interval’s parent interval as defined by the field function. For example, timeMinute.every(15) returns an interval representing every fifteen minutes, starting on the hour: :00, :15, :30, :45, etc. Note that for some intervals, the resulting dates may not be uniformly-spaced; timeDay’s parent interval is timeMonth, and thus the interval number resets at the s

interval.count()

interval.count(start, end) Returns the number of interval boundaries after start (exclusive) and before or equal to end (inclusive). Note that this behavior is slightly different than interval.range because its purpose is to return the zero-based number of the specified end date relative to the specified start date. For example, to compute the current zero-based day-of-year number: var now = new Date; d3.timeDay.count(d3.timeYear(now), now); // 177 Likewise, to compute the current zero-based

interval.ceil()

interval.ceil(date) Returns a new date representing the earliest interval boundary date after or equal to date. For example, timeDay.ceil(date) typically returns 12:00 AM local time on the date following the given date. This method is idempotent: if the specified date is already ceilinged to the current interval, a new date with an identical time is returned. Furthermore, the returned date is the maximum expressible value of the associated interval, such that interval.ceil(interval.ceil(date

interval()

interval(date) Alias for interval.floor. For example, timeYear(date) and timeYear.floor(date) are equivalent.

interpolate.gamma()

interpolate.gamma(gamma) Given that interpolate is one of interpolateRgb, interpolateCubehelix or interpolateCubehelixLong, returns a new interpolator factory of the same type using the specified gamma. For example, to interpolate from purple to orange with a gamma of 2.2 in RGB space: var interpolator = d3.interpolateRgb.gamma(2.2)("purple", "orange"); See Eric Brasseur’s article, Gamma error in picture scaling, for more on gamma correction.

identity.reflectY()

identity.reflectY([reflect]) If reflect is specified, sets whether or not the y-dimension is reflected (negated) in the output. If reflect is not specified, returns true if y-reflection is enabled, which defaults to false. This is especially useful for transforming from standard spatial reference systems, which treat positive y as pointing up, to display coordinate systems such as Canvas and SVG, which treat positive y as pointing down.

identity.reflectX()

identity.reflectX([reflect]) If reflect is specified, sets whether or not the x-dimension is reflected (negated) in the output. If reflect is not specified, returns true if x-reflection is enabled, which defaults to false.