Граф коммитов

15 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 1b3a3b3cb3 dispatch.on(name) returns the current listener.
Fixes #383. This includes a non-backwards-compatible change to d3.rebind, so as
to make it easier to rebind multiple methods on subclasses.
2011-11-22 14:36:09 -08:00
Mike Bostock c86108e522 Fix a daylight savings bug in d3.time.format.
We weren't computing the day-of-year number correctly, which affected both day
number and week number directives (%j, %U, and %W).
2011-10-12 15:37:32 -07:00
Mike Bostock 2adcdfe9d0 Add extended ISO 8601 support.
The d3.time.format.iso is designed to be compatible with the default JSON
serialization of dates, which includes milliseconds. So, d3.time.format now
supports the %L directive for formatting and parsing milliseconds. This commit
also changes d3.time.format.iso to use native ISO date methods, if available.
2011-10-11 17:46:13 -07:00
Mike Bostock 21f605bae5 Add test for time scale.copy. 2011-08-21 21:07:29 -07:00
Mike Bostock 5d17075bf3 Add scale.copy.
This returns a copy of the scale, such that future modifications to the scale's
domain or range (or other attributes) are isolated from the copy. This is useful
for transitions where you may want to make a copy of a scale before it changes,
such that entering elements can be initialized using the previous copy.
2011-08-12 15:58:42 -07:00
Mike Bostock ac03adf0c5 Time range methods now allow steps.
Now you can say d3.time.seconds(start, stop, step), which will return every
step'th second after start (inclusive) and before stop (exclusive). In addition,
you can now pass a range method to the time scale's ticks method, which makes it
easier to generate ticks. For example, x.ticks(d3.time.seconds, 15) will return
15-second ticks, rather than using the automatic default.
2011-07-31 17:28:04 -07:00
Mike Bostock 4aae4f7560 Add d3.time.scale.utc.
Also fix a bug in d3.time.hour in regards to daylight savings.
Also fix a number of tests that weren't testing the desired functionality.
2011-07-20 13:56:44 -07:00
Mike Bostock f32995e844 Rename a few private symbols. 2011-07-20 12:50:06 -07:00
Mike Bostock e2187aab37 Add d3.time.scale. 2011-07-19 18:44:04 -07:00
Mike Bostock ee74c4608a Add various time iteration utilities. 2011-07-18 17:56:30 -07:00
Mike Bostock 068e66de31 Add UTC & ISO time formats. 2011-06-15 00:16:46 -07:00
Mike Bostock 4f16bbd9e7 Regenerate files. 2011-06-13 17:30:30 -07:00
Mike Bostock ff9da42269 Fix a couple bugs in d3.time.format.
First, we were using the wrong space-filling format for %d and equivalent.
Second, we weren't parsing numbers with optional leading spaces correctly.
Yay tests!
2011-03-12 17:00:55 -08:00
Michael Bostock bdcb648849 Turn off the compiler's "advanced" optimizations.
The renaming of attributes is totally not worth the hassle of maintaining an
externs file (or using the awkward `foo["bar"]` syntax). The file size
reduction from the advanced optimizations was negligible, besides!
2011-01-05 11:35:39 -08:00
Michael Bostock 46b80565c9 Almost complete strptime & strftime. 2010-11-05 16:23:53 -07:00