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

178 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 1bfd9a48d3 Revert previous commit; move urlencode to plugin. 2012-09-19 18:54:36 -07:00
Mike Bostock f6c8059dd5 Add d3.urlencode.
And d3.xhr now detects if the data has a type attribute; if so, this is used to
set the Content-Type header if one has not already been specified. In
conjunction with d3.urlencode, it is now easy to post encoded parameters.
2012-09-19 18:37:23 -07:00
Mike Bostock 79c9737d70 Fix d3.json. 2012-09-19 10:39:24 -07:00
Mike Bostock 1c32d23fa4 More flexible XHR framework.
This is backwards-compatible, yet adds numerous features to d3.xhr. You can now:

  * Use standard node-style callbacks (fixes #473).
  * Abort in-flight requests.
  * Listen for progress events.
  * Listen for load, error and abort events separately.
  * Make POST requests (or any other method), including data.
  * Set arbitrary request headers.
  * Have multiple listeners on requests.
2012-09-18 15:49:03 -07:00
Mike Bostock cded852ba4 Add d3.lab and d3.hcl.
Includes d3.interpolateLab and d3.interpolateHcl.
2012-08-08 21:22:21 -07:00
Mike Bostock 952abefad0 Add d3.random.{logNormal,irwinHall}. Fixes #571. 2012-08-08 20:42:12 -07:00
Mike Bostock 15ba641fa3 Merge remote-tracking branch 'origin/map' into 2.10.0
Conflicts:
	src/core/transition-attr.js
	src/core/transition-style.js
2012-08-08 18:08:47 -07:00
Mike Bostock 07f72be0aa Multi-value map support for on. 2012-08-05 16:29:04 -07:00
Mike Bostock 74596a90f7 Remove support for functions that return maps. 2012-08-05 15:52:10 -07:00
Mike Bostock f2b45c132d Multi-value map support for classed. 2012-08-05 14:54:02 -07:00
Mike Bostock ce8852b9b4 Multi-value map support for property. 2012-08-05 09:53:33 -07:00
Mike Bostock 5c1dd6d904 Multi-value map support for style. 2012-08-05 09:53:07 -07:00
Mike Bostock 1976674fc7 Multi-value map support for attr. 2012-08-05 09:52:31 -07:00
Mike Bostock da3131c876 Use hyphen instead of unicode minus for negatives.
Although the unicode minus is typographically correct, using the standard hyphen
is more conventional (and is compatible with standard parsing).
2012-08-02 17:48:26 -07:00
Jason Davies 65a464582d d3.bisect: support very large arrays. 2012-07-31 14:00:26 +01:00
Jason Davies aa3e38e398 Fix and add tests for transition.filter.
Thanks, @mbostock!
2012-07-25 19:36:21 +01:00
Mike Bostock ae1fed7f4f Use shortest path for hue in d3.interpolateHsl.
Fixes #688.
2012-06-28 17:43:26 -07:00
Jason Davies 40ca7f2df7 Remove trailing commas. 2012-05-27 16:13:10 +01:00
Jason Davies 82051284b1 Fix race condition in transition tests.
The transition-test-text callback was failing to fire when using the
latest Node.js master (82bcdbb8aaa4cf58917dc8d3fd4fcfc272512a2c).  This
was most likely due to these tests being run in a different order due to
a different object enumeration order.
2012-05-27 15:25:43 +01:00
Mike Bostock 00bc3f05a7 Fix another rounding bug with SI-format.
Turns out 1400 * .001 is 1.4000000000000001, but 1400 / 1000 is 1.4.
2012-04-25 22:18:02 -07:00
Jason Davies e7025c7e4a Update jsdom to v0.2.14.
We can finally re-enable those tests!
2012-04-15 19:59:56 +01:00
Mike Bostock 21fe6d10f2 Fix a bug when interpolating exponent notation.
We weren't properly detecting "1.e2" as a valid number.
2012-03-08 10:56:15 +01: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 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 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 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 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
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 2314b2a0cd Simplify. 2012-02-20 04:52:53 +00:00
Jason Davies 2dbe80fd34 Fix another edge case for data binding. 2012-02-20 04:43:44 +00:00
Jason Davies 19dd294c50 Fix d3.nest and d3.ns for built-in properties. 2012-02-20 04:06:20 +00:00
Jason Davies 1030db1cd6 Fix d3.interpolate for built-in prototype properties. 2012-02-20 03:31:02 +00:00
Jason Davies 1e63be0cdd Handle keys that are in the default object's prototype chain.
This may seem a bit improbable at first, but I ran into this when
testing something unrelated in Firefox, which turns out to have:

  "watch" in {} === true
2012-02-20 03:18:10 +00: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 1643aa9b46 Merge branch 'master' of https://github.com/trevnorris/d3 into v2.8.0
I simplified the implementation, though it still seems somewhat magical. I
would be more confident if there were an easy way to extract the mantissa and
exponent from a floating point number, but since JavaScript does not expose the
bitwise representation of numbers, there's no easy way to do it.
2012-02-18 13:05:02 -08:00
Trevor Norris 8178c2961b clean up step calculations. add better method for values with no decimal part. included additional tests to demonstrate fixes. 2012-02-15 14:23:27 -08:00
Trevor Norris de8cddc6b8 forgot to follow spacing rules 2012-02-14 16:09:52 -08:00
Trevor Norris 76b13d547f use better method for calculating error correction. add test that failed the old method. 2012-02-14 16:03:38 -08:00
Trevor Norris 87f48b7aa2 fix range increment error caused by IEEE 754 2012-02-07 14:09:39 -08:00
Mike Bostock fef4f911db Merge branch 'dispatch-chain' of https://github.com/jasondavies/d3 into dispatch-chain 2012-01-29 10:43:22 -08:00