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

1474 Коммитов

Автор SHA1 Сообщение Дата
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 e46b1615a1 Update histogram example. 2012-02-28 17:52:16 -08:00
Mike Bostock b42e818ce8 Merge branch 'update-jsdom' of https://github.com/stepheneb/d3 2012-02-24 23:36:51 -08:00
Stephen Bannasch eb607a5174 update to latest jsdom
The update is to get the most recent version of contextify
which is a dependency of jsdom. Previous versions of 
contextify always generate a 64 library module. v0.6.11 of
node on macos is a 32-bit ARCH. The latest version of 
contextify  builds an ARCH that matches node NOT the arch
of the system.

See: https://github.com/brianmcd/contextify/issues/19
2012-02-25 00:14:55 -05:00
Mike Bostock 0bd675ca49 Merge branch 'v2.8.0' 2012-02-24 19:19:34 -08:00
Mike Bostock b59f117341 Add tests for d3.scale.identity.
Also, we need to coerce the input values to numbers, since this is a
quantitative scale and the ticks and tickFormat methods assume numbers.
2012-02-23 10:32:42 -08:00
Mike Bostock 7663a9c291 Save two bytes. :trollface: 2012-02-22 22:50:40 -08:00
Mike Bostock ec12de6eec Rewrite brush to use transient listeners.
Fixes #566. Closures are way better than globals!
2012-02-22 22:40:44 -08:00
Mike Bostock d2f0e0bbf4 Transient listeners for drag behavior.
Fixes #516.
2012-02-22 21:59:13 -08:00
Mike Bostock 74be6c13d8 Fix a bug when clearing event listeners.
We weren't deleting the reference to the removed listener, so we were leaking
memory and returning a stale value on a subsequent get. Also, we now stash the
capture value when setting an event listener, so that we can automatically
remove or replace a listener without the caller needing to specify capture.
2012-02-22 21:39:02 -08:00
Mike Bostock 60e8fb5603 Merge branch 'master' of https://github.com/indec/d3 into v2.8.0 2012-02-22 17:58:25 -08:00
Mike Bostock e5e24305e2 Add sourceEvent to custom events.
The drag behavior, zoom behavior and brush component now set a "sourceEvent"
property on their events, defined as the triggering mouse or touch event. The
d3.mouse and d3.touches helpers likewise use the source event, letting you query
the mouse or touch location when handling a custom event.
2012-02-22 17:34:58 -08:00
Mike Bostock 7bd053014b Only dispatch "brush" events if moved. 2012-02-22 14:13:25 -08:00
Mike Bostock cb97b4a167 Fix a bug with descending rangeBands. 2012-02-22 14:06:30 -08:00
Mike Bostock 522e269663 Merge branch 'force-tick' into v2.8.0 2012-02-21 23:17:59 -08:00
Mike Bostock 0aed1e403d Merge branch 'customticks' of https://github.com/larskotthoff/d3 into v2.8.0 2012-02-21 22:42:41 -08:00
Mike Bostock 34667bf5e0 Merge branch 'master' of https://github.com/ZeeAgency/d3 into v2.8.0 2012-02-21 22:12:11 -08:00
Mike Bostock 589b12f768 Merge branch 'bisect_accessors' of https://github.com/natevw/d3 into v2.8.0 2012-02-21 21:55:18 -08:00
Mike Bostock f13d60b2ab Force transition duration of at least 1ms.
Fixes #493. Also terminates any transitions with negative or NaN durations,
rather than having them run infinitely. Also coerces NaN delays to 0 as well, to
likewise avoid infinite transitions.
2012-02-21 18:35:13 -08:00
Mike Bostock 0cf999b08f Query data via selection.data(). Fixes #525.
This method returns the array of data for the first group in the selection. Note
that the data method cannot be used to clear data bindings, since it computes a
data join; use datum(null) to clear bound data.
2012-02-21 13:31:20 -08:00
Mike Bostock f80b1cf244 Add selection.datum. Fixes #489. 2012-02-21 10:31:15 -08:00
Mike Bostock 31b0d3f197 Slight simplification to d3.ns.qualify.
This changes the behavior slightly, but in a good way: if the namespace is
unknown, then it is ignored rather than returning an undefined namespace.
2012-02-21 10:03:23 -08:00
Mike Bostock 72da0cd88a Adopt d3.map for d3.format. 2012-02-21 09:04:00 -08:00
Mike Bostock 2c5293675e Adopt d3.map for d3.time.format. 2012-02-21 09:03:00 -08:00
Mike Bostock d69cbbdaa7 Adopt d3.map for d3.svg.line and d3.svg.area. 2012-02-21 08:55:03 -08:00
Mike Bostock 6affe7eb94 Adopt d3.map for d3.layout.stack. 2012-02-21 08:47:57 -08:00
Mike Bostock 0daedb2344 Harden d3_geo_type against object built-ins. 2012-02-21 08:42:37 -08:00
Mike Bostock 003c45e5b3 Adopt d3.map for d3.ease.
Also, if an unknown easing method or mode is specified, fallback to linear-in.
2012-02-21 08:39:42 -08:00
Mike Bostock 1e10e2ca88 Rename map.delete to map.remove.
Unfortunately, "delete" is a reserved word, and older browsers (such as mobile
WebKit) crash if you use reserved words as method names. I'd rather have code
that runs than strictly maintain interface-compatibility with the ES6 map.
2012-02-21 08:23:23 -08:00
Mike Bostock 030a48c154 Merge branch 'drag-touch' of https://github.com/jasondavies/d3 into builtin-properties 2012-02-21 08:18:27 -08:00
Jason Davies 00eebb3ef0 Don't block click events entirely on touch devices.
This preventDefault call prevents the click event from firing at all.
2012-02-21 13:15:38 +00:00
Mike Bostock a1c5ada8f8 Adopt d3.map for d3.transition's tweens. 2012-02-20 22:57:25 -08:00
Mike Bostock c6c4f3868c Adopt d3.map for d3.dispatch. 2012-02-20 22:54:38 -08:00
Mike Bostock a52855962c Don't support interpolating non-enumerables.
We don't need to support interpolating non-enumerable properties; make it
explicit that these properties may or may not be interpolated.
2012-02-20 22:49:31 -08:00
Mike Bostock 7187082ccc Use d3.map for d3.scale.ordinal. 2012-02-20 22:32:46 -08:00
Mike Bostock da43cf2068 map.set returns the set value.
This makes map.set(key, value) equivalent to object[key] = value.
2012-02-20 22:28:42 -08:00
Mike Bostock f1197ed8b6 Use d3.map for d3_svg_symbols.
This fixes a crash with the symbol type "hasOwnProperty", rather than defaulting
to "circle". This commit also adds new map methods to retrieve the keys, values
and entries. The map class now uses non-enumerable properties (if supported).
2012-02-20 21:30:23 -08:00
Mike Bostock 7069da0c79 Use a map for d3_rgb_names.
This way, we don't think "hasOwnProperty" is an RGB color. This commit also
replaces the map.keys method with a generic forEach iterator.
2012-02-20 20:40:43 -08:00
Mike Bostock b1f9905557 Rename slightly for clarity. 2012-02-20 20:24:11 -08:00
Mike Bostock 8ac45d9cdf Replace map with regex. 2012-02-20 20:14:24 -08:00
Zee Agency 474dfecc9d Expose d3_selection_enterPrototype for better extensibility 2012-02-20 21:28:10 +01:00
Jason Davies f1ef800c3c Simplify. 2012-02-20 20:25:23 +00:00
Jason Davies ebab983b8a Use d3.map instead of Object.hasOwnProperty.call. 2012-02-20 19:57:19 +00:00
Mike Bostock 738b634789 Add d3.map.
This is, essentially, an ES6 shim for a Harmony Map. We will use it instead of
using a bare object, so that we don't need to worry about collision with built-
in properties names (such as "__proto__" and "hasOwnProperty").
2012-02-20 11:23:36 -08:00
Jason Davies bb61f88aaf Fix interpolation of inherited object properties. 2012-02-20 08:52:45 +00:00
Jason Davies 84e58f1ee5 Remove dangling variables. 2012-02-20 05:00:01 +00:00
Jason Davies 2314b2a0cd Simplify. 2012-02-20 04:52:53 +00:00
Mike Bostock f37fd52100 Add d3.scale.identity. Fixes #483. 2012-02-19 20:52:44 -08:00
Jason Davies 4889a08e4c Merge remote-tracking branch 'mbostock/v2.8.0' into builtin-properties
Conflicts:
	d3.v2.min.js
2012-02-20 04:46:52 +00:00
Jason Davies d728a49172 Simplify. 2012-02-20 04:45:58 +00:00