vega-time 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -71,6 +71,12 @@ The supported options properties are:
71
71
  - _extent_: (required) A two-element (`[min, max]`) array indicating the date range over which the bin values are defined.
72
72
  - _maxbins_: The maximum number of allowable bins (default `40`). There will often be fewer bins as the domain gets sliced at "nicely" rounded values.
73
73
 
74
+ <a name="detectTimeUnits" href="#detectTimeUnits">#</a>
75
+ vega.<b>detectTimeUnits</b>(<i>data</i>, <i>field</i>[, <i>utc</i>])
76
+ [<>](https://github.com/vega/vega/blob/master/packages/vega-time/src/detectTimeUnits.js "Source")
77
+
78
+ Detect the time granularity of already-discretized date-time values, for example data pre-binned by month. Given an array of _data_ objects and a _field_ accessor for date-time values, returns an object describing the finest grain to which all values are aligned, in terms of `units` and `step` properties. These values can then be used as input to the [timeFloor](#timeFloor) or [utcFloor](#utcFloor) methods. If the optional _utc_ flag is true, alignment is assessed in Coordinated Universal Time (UTC), otherwise the local timezone is used.
79
+
74
80
  ### Local Time Utilities
75
81
 
76
82
  <a name="timeFloor" href="#timeFloor">#</a>