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

12 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock bd09d37e6c Refactor time tests for minimal load. 2013-03-14 13:29:24 -07:00
Mike Bostock 68be0ac8c8 Rename assert and XMLHttpRequest. 2013-03-14 13:00:04 -07:00
Mike Bostock a3bb93a749 Fix vows clobbering our custom asserts. 2013-03-05 09:01:18 -08:00
Mike Bostock 80009768b6 Fix for JavaScript's broken Date API. 2012-09-03 19:18:32 -07:00
Mike Bostock 83b5f45997 Fix #711 for years in the first century.
Alas, the JavaScript Date constructor is Y2K-centric.
2012-07-17 13:45:34 -07:00
Mike Bostock 41371adc98 Fixes #576: leap year bug in d3.time.format.
We need to set the date fields from year down, rather than in arbitrary order.
2012-02-29 11:27:30 -08:00
Mike Bostock 4af8633d88 Add tests for interval.offset.
Also, don't modify the passed-in date; for consistency with other methods, and
for convenience over performance, return a new date.
2012-02-19 12:24:38 -08:00
Mike Bostock 077411a236 Add interval.range, and time.scale.nice.
This commit provides a standard interface for time intervals:

  interval.floor(date)
  interval.ceil(date)
  interval.offset(date, k)
  interval.range(start, stop, step)

All local-time intervals (such as d3.time.day) have a UTC-equivalent interval,
available as interval.utc (such as d3.time.day.utc).

Fixes #463. Note that for the time.scale, an interval function is required to
nice (such as d3.time.day). In the future, we might relax that to allow a count
of ticks, similar to the ticks method, but in that case we'd also need the
ability to floor to a given tick number (e.g., every other week) and likewise
for ceil. This seems like a reasonable first implementation.
2012-02-18 22:56:54 -08:00
Mike Bostock 35dfb87d50 Add interval.ceil. Fixes #453. 2012-02-18 21:23:17 -08:00
Mike Bostock 3081dd45ef Consolidate everything into d3.v2.js.
Rather than producing separate files for each module, the default build now
produces a single file. This should encourage better page-load performance as
the files were relatively small. Also, it's easier to deal with only one file
rather than many, especially if you're not quite sure what the dependencies are.
You may still create minimized builds, if you don't want every feature.

This commit also demotes the chart components to the examples directory, rather
than keeping them as part of the core library. As always, D3 is not a charting
library, and these were ever only intended to serve as examples.
2012-02-18 14:04:01 -08:00
Mike Bostock 356d30ce28 Add test for time.minutes. 2011-08-14 19:38:02 -07:00
Mike Bostock e7d1a0a9b5 Add test for time.day. 2011-08-14 17:20:28 -07:00