Mike Bostock
95805adc9b
Promote the axis component to the svg module.
...
I'm including the axis component in the core build because it should be useful
in many different visualization types, similar to the other svg components. The
chart module contains a hodgepodge of more obscure visualization types, and
there's no reason to pull those in for more common visualizations. Perhaps most
importantly, the axis component isn't a chart type!
2011-08-23 12:02:12 -07:00
Mike Bostock
ce947ecf76
Allow minor and end tick size to be customized.
2011-08-23 11:07:18 -07:00
Mike Bostock
5126024ad3
Tick subdivision.
2011-08-23 10:45:04 -07:00
Mike Bostock
d8557e0efe
Fix a bug in path z-index.
...
The test wasn't catching it because it wasn't updating the domain.
2011-08-22 23:01:53 -07:00
Mike Bostock
8df955283f
Add support for axis orientations.
2011-08-22 22:53:51 -07:00
Mike Bostock
a4500fcfb1
Allow `on` to return the current listener.
...
Fixes #216 .
2011-08-22 18:50:14 -07:00
Mike Bostock
a0fa7a00e5
Tolerate empty domains. Fixes #115 .
2011-08-22 18:05:41 -07:00
Mike Bostock
770b24c742
Allow custom ticks and tickFormat.
...
Rather than specifying the ticks directly, you specify the arguments that will
be passed to the scale's ticks function. I suppose there are some obscure cases
where you might want more direct control over the generation of ticks, but this
makes the common case easy, and we could add a tickFunction property in the
future if we wanted to allow arbitrary control. Alternatively, you could write
a new scale type that supports the desired tick behavior (e.g., time scale).
2011-08-22 17:28:45 -07:00
Mike Bostock
eecd123ecc
Add missing semicolons.
2011-08-22 11:33:13 -07:00
Mike Bostock
2f1472b67d
Expose selection and transition prototypes.
...
This means that you can now extend D3's selections and transitions with custom
functionality! Also, you can use now instanceof to see whether something is an
instanceof d3.selection or d3.transition.
2011-08-22 11:26:40 -07:00
Mike Bostock
21f605bae5
Add test for time scale.copy.
2011-08-21 21:07:29 -07:00
Mike Bostock
553bd4e36b
Expose transition id.
2011-08-21 20:34:22 -07:00
Mike Bostock
1704957cb0
Add test for transition.tween.
2011-08-21 17:50:22 -07:00
Mike Bostock
3f22d76fb3
Better tests for transition.attr.
2011-08-21 17:43:37 -07:00
Mike Bostock
f577542eff
Add test for transition.selectAll.
2011-08-21 17:36:24 -07:00
Mike Bostock
80fa16a351
Add test for transition.select.
2011-08-21 17:28:32 -07:00
Mike Bostock
e2b112bc81
Add tests for attrTween and styleTween.
2011-08-21 17:16:57 -07:00
Mike Bostock
51c7e58fdb
Add test for transition.remove.
...
Also fix a bug where it would be possible for an earlier to transition to become
the lock owner. We now guarantee that the lock owner can only increase while
transitions are scheduled on an element.
2011-08-21 15:54:17 -07:00
Mike Bostock
8cc290a00a
Add test for transition.call.
2011-08-21 15:21:57 -07:00
Mike Bostock
aeae92ca5c
Add test for transition.text.
2011-08-21 15:19:09 -07:00
Mike Bostock
5764e49992
Add tests for transition delay and duration.
2011-08-21 15:01:31 -07:00
Mike Bostock
af418fb5a4
Better tests for transitions.
...
This caught a couple bugs in the previous commit. First, I wasn't sending the
correct index (i) to the "end" event listeners, because it was being masked by
a local variable. Second, the transition lock was being incorrectly deleted when
a transition is inherited on the same node and there is zero delay and
d3.timer.flush is called. There was potentially a related bug where the active
field was not being cleared on the transition lock. Yay tests!
2011-08-20 23:50:34 -07:00
Mike Bostock
3b04b4f5ee
Oops, didn't mean to comment this out.
...
(Still passes though!)
2011-08-20 17:04:04 -07:00
Mike Bostock
18b9e11414
Prototype injection!
...
This changes the core implementation of selections and transitions to use
prototype injection rather than direct extension. This offers better performance
by eliminating per-instance overhead from closures and assignment. On browsers
that don't support prototype injection, we fall back to direct extension.
This commit isn't just about performance, though; the code ends up being a lot
cleaner and more separable if we force methods to rely solely on `this`, rather
than capturing surrounding variables with closures.
Most importantly, transitions are now "transparent", like selections. Rather
than opaque objects, transitions are now arrays of nodes, similar to selections.
The nodes are wrapped in an object that stores the delay and duration, which
means you can now inspect the computed delay and duration. (This was the
original motivation for this commit, and will allow chart components to be
call'd on transitions as well as selections.)
Transitions now support the `each` operator with one argument, which has the
same behavior as on selections. The `each` operator now passes a third argument
containing the group index (`j`). Transitions now also support a `tween`
operator, which is a generic mechanism for doing things during a transition; use
this in place of a "tick" event.
This commit also fixes a few bugs. The enter selection now supports the empty
operator; we can add other operators in the future more easily, if we so choose.
Transition's attr operator now supports namespaced attributes. Selection's
property operator no longer parses property namespaces.
2011-08-20 16:27:25 -07:00
Mike Bostock
0548319663
Add support for axis updates.
...
But, we don't yet support transitions and proper data joins.
2011-08-19 15:22:46 -07:00
Mike Bostock
83278300fd
Allow tickSize to be negative.
2011-08-19 14:45:56 -07:00
Mike Bostock
7184c57fbb
Expose tickSize and tickPadding properties.
2011-08-19 14:44:23 -07:00
Mike Bostock
4eedce984c
Checkpoint axis component.
...
This is the simplest possible implementation. It does not yet support updating
an existing display, specifying different scales for different instances,
overriding ticks, overriding tick format, transitions, etc. etc.
2011-08-19 14:26:39 -07:00
Mike Bostock
434b9eedb9
Merge branch 'master' into scale-clone
2011-08-19 13:56:02 -07:00
Mike Bostock
3c0f29943c
Add test for tree layout.
...
For now, test the bug we just fixed.
2011-08-19 11:01:12 -07:00
Mike Bostock
d2b152ce7f
Fix a bug in ordinal.copy. More tests.
2011-08-18 14:59:55 -07:00
Mike Bostock
7c2062f289
Fix a crash when rounding very small numbers.
2011-08-17 16:13:50 -07:00
Mike Bostock
f12352c6f4
Add test for svg.area.radial.
...
Also, better formatting for failure message in assert.pathEqual.
2011-08-17 16:07:28 -07:00
Mike Bostock
ff083fd068
Better tests for svg.area and svg.line.radial.
2011-08-17 14:58:49 -07:00
Mike Bostock
b5a857fda9
Add test for svg.line.radial.
2011-08-17 14:24:54 -07:00
Mike Bostock
8f78f5ec39
Better tests for svg.line.
2011-08-17 14:09:34 -07:00
Mike Bostock
559394bdb9
Better tests for svg.arc.
...
This also fixes a bug when start and end angle are inverted.
2011-08-17 13:27:55 -07:00
Mike Bostock
72c9cd4dde
Add test for categorical scales.
2011-08-16 23:11:52 -07:00
Mike Bostock
f23cb315de
Add test for scale.quantize.
2011-08-16 22:51:32 -07:00
Mike Bostock
3db7fd1b65
Add test for csv.format.
2011-08-16 22:39:02 -07:00
Mike Bostock
aa6401693d
Add test for csv.
2011-08-16 22:30:46 -07:00
Mike Bostock
746ec74663
Add tests for xhr and friends.
2011-08-16 22:28:15 -07:00
Mike Bostock
40b98c4d7b
Add test for timer.
...
Also fix a minor bug where we might miss the delay the first callback by an
extra frame, and allow d3.timer to be called with an optional delay.
2011-08-16 21:21:16 -07:00
Mike Bostock
e3886060b9
Add test for ease.
2011-08-16 12:26:47 -07:00
Mike Bostock
7d018fbc41
Add test for dispatch.
2011-08-16 11:32:32 -07:00
Mike Bostock
eccef138e6
Add test for range.
...
Also, fix a bug where step could be specified as undefined or null, rather than
checking the arity of the arguments.
2011-08-16 11:16:53 -07:00
Mike Bostock
22732f5da8
Add test for quantile.
2011-08-16 10:59:34 -07:00
Mike Bostock
ffb445bb1b
Add test for requote.
...
And, fix a bug where pipes were not escaped.
2011-08-16 10:51:55 -07:00
Mike Bostock
a0e3e84972
Add test for rebind.
2011-08-15 22:19:58 -07:00
Mike Bostock
d756660748
Add test for functor.
2011-08-15 21:47:14 -07:00
Mike Bostock
aa1ef3ba3b
Add test for split.
2011-08-15 21:41:03 -07:00
Mike Bostock
09c5e5157d
Add test for merge.
2011-08-15 21:29:55 -07:00
Mike Bostock
c8ad125aee
Add test for first and last.
...
Also fix bugs in ascending and descending when comparing undefined and NaN.
2011-08-15 21:23:34 -07:00
Mike Bostock
80a4078e8d
Add test for layout.partition.
2011-08-15 16:43:59 -07:00
Mike Bostock
cdfbca94a5
Add test for scale.quantile.
2011-08-15 16:25:39 -07:00
Mike Bostock
d6f4b2a299
Add test for scale.sqrt.
2011-08-15 16:02:41 -07:00
Mike Bostock
0872e949ba
Add test for scale.pow.
2011-08-15 15:53:46 -07:00
Mike Bostock
780bf7cc07
Add test for scale.ordinal.
2011-08-15 15:42:01 -07:00
Mike Bostock
7c25304ffe
Add tests for nicing poly domains.
2011-08-15 15:30:55 -07:00
Mike Bostock
9684389ea0
Add test for scale.log.
2011-08-15 15:26:10 -07:00
Mike Bostock
9a2c6a0657
Add test for scale.linear.
...
Woot! Found a bug in d3.interpolate related to string coercion and colors.
2011-08-15 15:12:54 -07:00
Mike Bostock
67ab76bcc1
Add test for layout.treemap.
...
Woot! Caught another bug in propagation of NaN node values.
2011-08-15 14:12:17 -07:00
Mike Bostock
f25c469d3d
Add test for layout.histogram.
2011-08-15 13:32:34 -07:00
Mike Bostock
b7e1413295
Add test for svg.symbol.
2011-08-15 13:07:28 -07:00
Mike Bostock
5e9bead57f
Add test for svg.line.
2011-08-15 12:55:42 -07:00
Mike Bostock
aae78283b1
Add test for svg.area.
2011-08-15 12:50:20 -07:00
Mike Bostock
aa5ac0342e
Add test for svg.arc.
2011-08-15 12:16:14 -07:00
Mike Bostock
b0d911e90e
Add tests for time.scale and time.scale.utc.
2011-08-15 11:40:42 -07:00
Mike Bostock
9a05f86c92
Add tests for time.format.parse.
2011-08-14 21:50:20 -07:00
Mike Bostock
3c3c9d122d
Add test for time.format.utc.
2011-08-14 21:30:17 -07:00
Mike Bostock
7e04c3888d
Add test for time.format.
2011-08-14 21:28:10 -07:00
Mike Bostock
6e7047fe5b
Add test for time.format.iso.
2011-08-14 21:03:01 -07:00
Mike Bostock
5f29160efc
Add test for time.years.
2011-08-14 20:55:11 -07:00
Mike Bostock
9c56e7fd0e
Add test for time.year.
2011-08-14 20:54:48 -07:00
Mike Bostock
e90a4666c3
Add test for time.weeks.
2011-08-14 20:47:20 -07:00
Mike Bostock
69061ea5d1
Add test for time.week.
2011-08-14 20:38:02 -07:00
Mike Bostock
521ca64a33
Add test for time.seconds.
2011-08-14 20:29:08 -07:00
Mike Bostock
af8f0c571f
Add test for time.second.
2011-08-14 20:23:23 -07:00
Mike Bostock
3b38d71d2e
Add tests for skipping time intervals.
2011-08-14 20:18:58 -07:00
Mike Bostock
a8d023d6f4
Add test for time.months.
2011-08-14 20:02:49 -07:00
Mike Bostock
959b8f9d18
Add test for time.month.
2011-08-14 19:51:53 -07:00
Mike Bostock
356d30ce28
Add test for time.minutes.
2011-08-14 19:38:02 -07:00
Mike Bostock
4ee4398d6f
Add IST & NPT test for time.hours.
2011-08-14 19:22:27 -07:00
Mike Bostock
4be8e48d4d
Add test for time.minute.
2011-08-14 19:16:56 -07:00
Mike Bostock
b849f027bd
Add test for time.hours.
2011-08-14 18:59:01 -07:00
Mike Bostock
c7eecb9627
Add test for time.hour.
2011-08-14 18:14:59 -07:00
Mike Bostock
e7d1a0a9b5
Add test for time.day.
2011-08-14 17:20:28 -07:00
Mike Bostock
08d785f6ea
Add test for time.days.
2011-08-14 17:01:15 -07:00
Mike Bostock
26c69879c9
Add test for csv.parse.
...
Woot, caught my first bug!
2011-08-14 14:37:24 -07:00
Mike Bostock
3a5a6c6c0d
Add test for transition.
2011-08-14 13:07:20 -07:00
Mike Bostock
03253fcff6
Add test for nest.
2011-08-14 12:57:09 -07:00
Mike Bostock
0cd0ede546
Add test for interpolate.
2011-08-14 11:52:59 -07:00
Mike Bostock
3771bf5f64
Add test for hsl.
2011-08-14 11:16:03 -07:00
Mike Bostock
3685a428fe
Add test for rgb.
2011-08-14 10:53:34 -07:00
Mike Bostock
6d138b2510
Add test for format.
2011-08-14 10:11:37 -07:00
Mike Bostock
01fb201f4e
Add test for round.
2011-08-14 09:29:42 -07:00
Mike Bostock
cb7ebe11e8
Add test for permute.
2011-08-14 09:11:33 -07:00
Mike Bostock
80ca9b8f8e
Add test for entries.
2011-08-14 09:03:00 -07:00
Mike Bostock
15d7e87fdb
Add test for d3.values.
2011-08-13 23:13:28 -07:00
Mike Bostock
5f998d68e3
Add test for keys.
2011-08-13 23:09:37 -07:00
Mike Bostock
6b74562910
Add test for d3.sum.
2011-08-13 23:00:24 -07:00
Mike Bostock
318b6713e1
Add test for zip.
2011-08-13 22:54:08 -07:00
Mike Bostock
e6638b66b8
Add tests for min and max.
2011-08-13 22:45:02 -07:00
Mike Bostock
96c2a750bb
Update comment.
2011-08-13 19:25:54 -07:00
Mike Bostock
9d85f339f8
Add test for selection.on.
2011-08-13 19:10:38 -07:00
Mike Bostock
695834b99d
Remove old tests for insert and remove.
2011-08-13 18:47:23 -07:00
Mike Bostock
ca8476097d
Add test for selection.remove.
2011-08-13 18:46:20 -07:00
Mike Bostock
5f5d8a227e
Test selection operator return values.
2011-08-13 18:40:38 -07:00
Mike Bostock
e7ad8bb185
Add test for selection.insert.
2011-08-13 18:22:13 -07:00
Mike Bostock
c88d9d14c9
Add test for enter-append.
2011-08-13 18:15:14 -07:00
Mike Bostock
b65f4de740
Verify that data is propagated on append.
2011-08-13 18:08:34 -07:00
Mike Bostock
354765c309
Add test for selection.data.
2011-08-13 18:05:02 -07:00
Mike Bostock
8986f76af6
Add test for d3.version.
2011-08-13 18:04:34 -07:00
Mike Bostock
247a6c6e9d
Add tests for d3.ascending and d3.descending.
2011-08-13 17:33:45 -07:00
Mike Bostock
94800d39d2
Add test for selection.sort.
2011-08-13 17:27:54 -07:00
Mike Bostock
f72cc35359
Add test for selection.html.
2011-08-13 16:45:10 -07:00
Mike Bostock
f58bed27fd
Add test for selection.text.
2011-08-13 14:43:04 -07:00
Mike Bostock
f4a7a610f6
Add test for selection.each.
2011-08-13 14:23:02 -07:00
Mike Bostock
68e9f96f03
Add test for selection.node.
2011-08-13 11:36:39 -07:00
Mike Bostock
2ed5801e72
Add test for selection.empty.
2011-08-13 11:34:41 -07:00
Mike Bostock
badce35c76
Add test for selection.map.
2011-08-13 11:28:40 -07:00
Mike Bostock
c22d45027c
Add tests for ignoring null nodes.
2011-08-13 11:13:38 -07:00
Mike Bostock
7718469d91
Add selection.filter test.
2011-08-13 11:00:52 -07:00
Mike Bostock
ca424e1724
Add test for selection.classed.
2011-08-13 10:48:01 -07:00
Mike Bostock
983d77ba98
Add test for selection.call.
2011-08-13 10:26:40 -07:00
Mike Bostock
7a6ebbfb15
Remove old tests for bisect.
2011-08-13 10:19:14 -07:00
Mike Bostock
b881b520ea
Remove old tests for append and attr.
2011-08-13 10:18:49 -07:00
Mike Bostock
d59f7a9f6f
Add test for bisect methods.
2011-08-13 10:18:40 -07:00
Mike Bostock
2fb6d98ef1
Add tests for namespacing and property removal.
2011-08-12 23:58:56 -07:00
Mike Bostock
1444698b22
Add tests for selection select and selectAll.
2011-08-12 23:26:46 -07:00
Mike Bostock
822bcdd1a1
Update tests for select and selectAll.
2011-08-12 21:52:45 -07:00
Mike Bostock
53326dac6c
Add tests for selection.{attr,property,style}.
2011-08-12 21:52:10 -07:00
Mike Bostock
1035e71450
Add test for selection.append.
2011-08-12 21:50:50 -07:00
Mike Bostock
07b068ea6c
Add test for d3.ns.
2011-08-12 21:42:40 -07:00
Mike Bostock
0e9589d1f2
Checkpoint new test framework using Vows.
2011-08-12 18:07:42 -07:00
Mike Bostock
9cd6a46019
Fix #236 - scale.pow accepts negative values.
2011-08-01 11:23:26 -07:00
Mike Bostock
7590713270
Fix #66 - setting domain recomputes range.
2011-08-01 11:16:38 -07:00
Mike Bostock
ac03adf0c5
Time range methods now allow steps.
...
Now you can say d3.time.seconds(start, stop, step), which will return every
step'th second after start (inclusive) and before stop (exclusive). In addition,
you can now pass a range method to the time scale's ticks method, which makes it
easier to generate ticks. For example, x.ticks(d3.time.seconds, 15) will return
15-second ticks, rather than using the automatic default.
2011-07-31 17:28:04 -07:00
Mike Bostock
94f4ed23be
Simplify check for zero-area treemap cells.
2011-07-31 16:09:13 -07:00
Mike Bostock
a8558d9d40
Merge branch 'time' into release
2011-07-20 15:24:27 -07:00
Mike Bostock
4aae4f7560
Add d3.time.scale.utc.
...
Also fix a bug in d3.time.hour in regards to daylight savings.
Also fix a number of tests that weren't testing the desired functionality.
2011-07-20 13:56:44 -07:00
Mike Bostock
e2187aab37
Add d3.time.scale.
2011-07-19 18:44:04 -07:00
Mike Bostock
e37031a38c
Organize tests into modules.
2011-07-18 18:08:06 -07:00