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

1159 Коммитов

Автор SHA1 Сообщение Дата
Jason Davies c724d95f77 Update UglifyJS, JSDOM and Vows.
I ran the tests on the newly minified files too, for good measure, and
everything passed.
2011-10-13 11:35:59 +01:00
Mike Bostock c623877461 Add hierarchical bar chart example. 2011-10-13 00:30:45 -07:00
Mike Bostock 4731d2cbb2 Calendar example improvements. 2011-10-12 17:55:08 -07: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 846bd5c5f5 Add dji-area example with ggplot2 styles. 2011-10-12 14:02:57 -07:00
Mike Bostock 32907ec505 Merge branch 'release' 2011-10-11 18:02:06 -07:00
Mike Bostock 639f802d22 Merge branch 'nice' into release 2011-10-11 18:01:43 -07:00
Mike Bostock b5a1c34cdf Merge branch 'nice' of https://github.com/jasondavies/d3 into nice 2011-10-11 18:01:25 -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 307016e843 Fix a rounding bug in SI-prefix format.
Also, expose d3.formatPrefix so that it's easier for callers to create a
formatter for a specific prefix (such as using the "G" prefix for all ticks).
2011-10-11 16:46:47 -07:00
Jason Davies d2943a0724 Better handling of empty domains for nice scales. 2011-10-11 09:12:56 +01:00
Mike Bostock 4adfae719a Add DOM-to-Canvas example. 2011-10-10 21:40:52 -07:00
Mike Bostock 672b331283 Merge branch 'release' 2011-10-10 21:40:10 -07:00
Mike Bostock 92524e9796 Merge branch 'si-format' into release 2011-10-10 21:39:00 -07:00
Mike Bostock 1f20609a41 Merge branch 'centroid' into release 2011-10-10 21:38:26 -07:00
Mike Bostock 32d871c4a0 Merge branch 'mean' into release 2011-10-10 21:37:56 -07:00
Mike Bostock b5dc45a87c Better rounding of significant digits.
This simplifies the implementation and fixes a few bugs. The si prefix format
("s") now supports variable precision; in fact, you are strongly recommended to
specify a precision, such as ".3s".
2011-10-10 21:13:25 -07:00
Mike Bostock fe83f16321 Merge branch 'add-si-prefix-format' of https://github.com/pjjw/d3 into si-format 2011-10-10 17:54:46 -07:00
Mike Bostock 9d9a3f7ca6 Merge branch 'geom-centroid' of https://github.com/jasondavies/d3 into centroid 2011-10-10 17:50:17 -07:00
Mike Bostock 31cb66f9f1 Add d3.median. 2011-10-10 17:49:53 -07:00
Mike Bostock 9523c4d2d1 Merge branch 'mean' of https://github.com/jasondavies/d3 into mean 2011-10-10 17:41:52 -07:00
Mike Bostock d2ba3b2d2c Minor fixes for the axis component.
You can now change the orientation and the axis will redraw correctly. When an
axis is applied by a transition, the subtransitions will properly inherit the
transition id, allowing transitions on reselected elements to continue.
2011-10-10 16:45:08 -07:00
Jason Davies f9148ed4f4 Rearrange polygon tests.
This arranges them first by the type of polygon we're testing, then the
operations.  I've added tests for clockwise polygons too, for good
measure.
2011-10-08 18:19:01 +01:00
Jason Davies 3740741441 Add tests for d3.geom.polygon and fix centroid bug.
d3.geom.polygon(…).area() assumes screen pixel coordinates with (0, 0)
at the top left, and y increasing going downwards.  This results in a
positive area for counterclockwise coordinates.  Howver, the default
centroid calculation was assuming "usual" Cartesian coordinates with y
increasing going upwards, hence the centroid coordinates were
incorrectly multiplied by -1.

This fix won't affect d3.geo.path(…).centroid() as it passes a constant
to d3.geom.centroid.
2011-10-08 18:01:53 +01:00
Mike Bostock 50ecefd734 Merge pull request #335 from jasondavies/test
Fix tests in Linux.
2011-10-08 09:45:47 -07:00
Jason Davies 7a8460ede0 Remove dangling __data__ from other tests.
This occurs on Linux, where the directory listing order is different
from OS X and so other tests leave data bound to the "body" element.
This data is then propagated when new elements are appended, and thus
mess up some of the tests!
2011-10-08 13:01:35 +00:00
Jason Davies bf73f5c506 Fix another couple of race conditions in tests. 2011-10-08 12:42:45 +01:00
Jason Davies b9db0585cb Fix some potential race conditions in tests.
Unless .html("") is called on d3.select("body"), elements appended by
another test could interfere with data binding.

See #329.
2011-10-08 00:09:59 +01:00
Mike Bostock 0e0ba08900 Fix a centroid bug with CCW polygons. 2011-10-07 15:37:51 -07:00
Jason Davies da189667c1 Add d3.mean.
Uses Welford's algorithm to avoid overflow.

See #245.
2011-10-07 22:00:44 +01:00
Mike Bostock 9edd4bc058 Merge branch 'release' 2011-10-07 12:33:08 -07:00
Mike Bostock 05e9a39837 Fix spaces. 2011-10-07 12:22:56 -07:00
Mike Bostock 9e303516f0 Merge branch 'classed' of https://github.com/jasondavies/d3 into release 2011-10-07 12:18:33 -07:00
Mike Bostock 440d96155f Merge branch 'transition-null' of https://github.com/jasondavies/d3 into release
Conflicts:
	test/core/transition-test-attr.js
2011-10-07 12:17:17 -07:00
Mike Bostock 87c1f831cb Merge branch 'area-step-interpolate' into release 2011-10-07 12:16:15 -07:00
Mike Bostock 0b852dd892 Copy constructors for d3.rgb and d3.hsl.
Previously, these would work by coercing the input color to a string and then
parsing it. This is slow, but more importantly, this is a lossy process for HSL
colors due to the conversion to hexadecimal RGB format. This commit detects
instances of d3_Rgb and d3_Hsl on input and copies them efficiently.
2011-10-07 12:10:10 -07:00
Mike Bostock 4d1de5e175 Fix a bug in area step interpolation.
When computing the reversed baseline, we need to switch between step-before and
step-after, since the points are in reverse order. Otherwise, we're effectively
filling the gap between step-before and step-after.
2011-10-07 11:32:06 -07:00
Jason Davies cc0ae766b7 Make toString return #RRGGBB for all colours.
This breaks a test case that ensures d3.hsl(x) == d3.hsl(d3.hsl(x)).

Fixes #333.
2011-10-07 17:58:58 +01:00
Jason Davies 6b83af4256 Use ternary ? happy : unhappy.
Using the comma operator isn't so bad, and I added it to removeAttribute
for good measure in case there's an implementation out there that
returns something.
2011-10-06 20:34:06 +01:00
Jason Davies 037493c250 Fix bug when transitioning namespaced attributes.
Also, simplify handling of nulls.
2011-10-06 20:06:14 +01:00
Mike Bostock f70ab33e85 Merge pull request #328 from larskotthoff/maketarget
make Makefile GNU make v3.82 compatible
2011-10-06 08:45:49 -07:00
Jason Davies 8f8c7108d8 Small optimisation. 2011-10-06 09:56:34 +01:00
Jason Davies 57a3b0dbcb More efficient removal of transition properties.
Thanks, @mbostock!
2011-10-06 09:54:07 +01:00
Jason Davies db65a3849f Use removeAttribute when transitioning to null. 2011-10-05 23:05:42 +01:00
Jason Davies f5c60ecfde Fix null check in style transition. 2011-10-05 22:38:30 +01:00
Jason Davies 878d1c1c13 Fix transitioning styles to null (removal). 2011-10-05 22:35:19 +01:00
Lars Kotthoff f3b8c0ef04 remove duplicate rule and tweak "all" target (mbostock) 2011-10-04 19:34:16 +01:00
Lars Kotthoff 1bd3a255d5 make Makefile GNU make v3.82 compatible
Quote from NEWS file:

In previous versions of make it was acceptable to list one or more explicit
targets followed by one or more pattern targets in the same rule and it
worked "as expected". However, this was not documented as acceptable and if
you listed any explicit targets AFTER the pattern targets, the entire rule
would be mis-parsed. This release removes this ability completely: make
will generate an error message if you mix explicit and pattern targets in
the same rule.
2011-10-03 21:07:38 +01:00
Mike Bostock fe6128180e Merge branch 'showreel' 2011-09-30 18:00:42 -07:00
Mike Bostock ad066cd903 Add show reel example. 2011-09-30 17:59:54 -07:00