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

43 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 25a3a503b5 Add d3.permute. 2011-05-12 10:25:05 -07:00
Mike Bostock 7c518c547c Merge branch 'polylinear' 2011-05-08 19:54:40 -07:00
Mike Bostock e67e7d7d8b Refactor polylinear scales.
This commit adds a d3_uninterpolate method (private, for now), which is
essentially the inverse of d3.interpolate. It's used to map a value in the
domain to the unit range [0,1], which can then be passed to an interpolator.
2011-05-07 23:20:02 -07:00
Mike Bostock b1b6b14143 Merge branch 'monotone' into release 2011-05-07 16:34:01 -07:00
Mike Bostock 7367df8050 Improved monotone interpolation.
Mainly, I fixed a bug where the coordinates could get set to NaN if two
successive points have the same x-coordinate. But I also cleaned up the
implementation slightly, and compute the initial tangents using finite
differences.
2011-05-07 16:32:48 -07:00
Mike Bostock 8aa986dff1 Merge branch 'issue-78' into release 2011-05-07 11:28:48 -07:00
Mike Bostock 1c413cda33 Add tests for classed. 2011-05-07 11:27:48 -07:00
Mike Bostock bf5374423f Merge branch 'color' into release 2011-05-07 11:09:44 -07:00
Mike Bostock 6a2c0ef053 Add tests for hsl. 2011-05-07 11:08:48 -07:00
Mike Bostock 59b5ba99be Reorganize some color functions. More tests. 2011-05-07 10:59:49 -07:00
Mike Bostock 316526a09e Revert behavior of d3.keys.
We include keys inherited from the prototype.
2011-05-07 10:32:17 -07:00
Jason Davies 4024cb6681 Add .hsl().brighter() and .hsl().darker().
Also fix .rgb() and .hsl().
2011-05-05 21:44:40 +01:00
Jason Davies 1a83029485 Polylinear scales. Fixes #61.
For example:

    d3.scale.linear()
        .domain([-100, 0, 100])
        .range(["red", "white", "green"]);
2011-05-05 15:29:17 +01:00
Jason Davies 668cdaa767 Add `brighter` and `darker` to d3.rgb().
Fixes #138.
2011-05-05 12:38:55 +01:00
Jason Davies 05442751f9 Use "Object.keys" if available.
Also added "hasOwnProperty" check in the fallback to avoid enumerating
properties from the prototype chain.  This is the approach recommended in
<https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys>
and elsewhere.

See also: #96.
2011-05-03 13:40:27 +01:00
Jason Davies ae5123f84b Add monotone interpolation for lines and areas.
Based on the Protovis implementation.
2011-05-02 09:13:52 +01:00
Mike Bostock 2eb4573f42 Merge branch 'box' into release 2011-04-13 23:53:59 -07:00
Mike Bostock 2c80b09122 Remove blank line. 2011-04-13 23:45:54 -07:00
Mike Bostock 55ee1b8f87 Add test for interpolate. 2011-04-13 18:19:31 -07:00
Nelson Minar c7c9e7fad4 rename clamped() method to clamp() 2011-04-12 02:09:19 +00:00
Nelson Minar 2548d4fa32 Merge branch 'master' of https://github.com/mbostock/d3
Conflicts:
	d3.min.js
2011-04-12 02:02:48 +00:00
Mike Bostock 9f71e4e211 Fix a bug in cardinal-closed interpolation. 2011-04-10 23:26:35 -07:00
Nelson Minar a5055b4755 add clamped() to numeric scales 2011-04-10 21:42:25 +00:00
Mike Bostock 3e1e4f1e7c Add remove test. 2011-04-09 12:08:22 -07:00
Mike Bostock 0f8c8007a6 Add insert test. 2011-04-09 12:05:55 -07:00
Michael Bostock 29efd2a6d5 Fix a bug in d3.scale.log ticks. 2011-03-30 09:18:14 -07:00
Michael Bostock c572c7071f Add basic tests for d3.nest. 2011-03-26 18:50:32 +01:00
Michael Bostock 87a9b002e5 Merge branch 'csv_newlines' of https://github.com/jasondavies/d3 into jasondavies-csv_newlines 2011-03-17 17:35:04 -07:00
Michael Bostock 723a531874 Fix a type-coercion bug with scale domains. 2011-03-13 11:38:10 -07:00
Mike Bostock 244338925f Add tests for d3.svg.arc. 2011-03-12 20:24:17 -08:00
Mike Bostock 3fff37a56d Add tests for d3.svg.symbol. 2011-03-12 20:17:31 -08: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
Jason Davies e6d21d4d12 Fix newline parsing for quoted values. 2011-03-12 21:25:39 +00:00
Mike Bostock aad495add3 Add step-{before,after} interpolation.
Also add tests for d3.svg.area and d3.svg.line.
2011-03-12 12:43:51 -08:00
Jason Davies 2248e04ae4 Fix CSV parsing of \r\n and \r 2011-03-12 20:43:15 +00:00
Mike Bostock a6d5b6f4de Merge branch 'jasondavies-new_closure_compiler' into mbostock-master 2011-03-12 08:27:58 -08:00
Mike Bostock 651fb56c0a Minor tweaks to d3_call and tests. 2011-03-12 08:25:49 -08:00
Jason Davies d2ede7ce69 Add unit test for minified d3.call(). 2011-03-12 12:09:30 +00:00
Mike Bostock 996e21eb1b Fix typo in d3.scale.pow. Add tests. 2011-03-10 17:33:53 -08:00
Michael Bostock 871cefc0a4 Add a few tests for d3.scale.linear. 2011-03-08 14:24:23 -08:00
Michael Bostock 1be121ae20 Unplug env-js' timer module.
This was breaking setTimeout and setInterval in Node, since I've already
unplugged env-js' event loop. With that out of the way, we can write tests for
transitions!
2011-03-04 16:35:16 -08:00
Michael Bostock eaed6b880b Ack, Sizzle doesn't sort by default.
The Selectors API guarantees that results are returned in document order, but
Sizzle does not, by default. So now we sort the results when using Sizzle. Yay
tests!
2011-03-04 16:05:53 -08:00
Michael Bostock 50ebc155cb Test (and fixes) for d3.format. 2011-03-04 15:25:09 -08:00