Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MUR Drupal
d3-library
Commits
3234f47a
Commit
3234f47a
authored
Dec 16, 2013
by
Mike Bostock
Browse files
Merge branch 'fix-subscale-time-scale-nice'
parents
840a2d1f
d5b18a65
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
bower.json
View file @
3234f47a
{
"name"
:
"d3"
,
"version"
:
"3.3.1
2
"
,
"version"
:
"3.3.1
3
"
,
"main"
:
"d3.js"
,
"scripts"
:
[
"d3.js"
...
...
component.json
View file @
3234f47a
...
...
@@ -10,7 +10,7 @@
"animation"
,
"canvas"
],
"version"
:
"3.3.1
2
"
,
"version"
:
"3.3.1
3
"
,
"main"
:
"index-browserify.js"
,
"scripts"
:
[
"d3.js"
,
...
...
d3.js
View file @
3234f47a
d3 = function() {
var d3 = {
version
:
"
3.3.1
2
"
version: "3.3.1
3
"
};
if (!Date.now) Date.now = function() {
return +new Date();
...
...
@@ -9242,7 +9242,9 @@ d3 = function() {
var d3_time_scaleMilliseconds = {
range: function(start, stop, step) {
return d3.range(+start, +stop, step).map(d3_time_scaleDate);
}
},
floor: d3_identity,
ceil: d3_identity
};
var d3_time_scaleUTCMethods = d3_time_scaleLocalMethods.map(function(m) {
return [ m[0].utc, m[1] ];
...
...
d3.min.js
View file @
3234f47a
This diff is collapsed.
Click to expand it.
package.json
View file @
3234f47a
{
"name"
:
"d3"
,
"version"
:
"3.3.1
2
"
,
"version"
:
"3.3.1
3
"
,
"description"
:
"A small, free JavaScript library for manipulating documents based on data."
,
"keywords"
:
[
"dom"
,
...
...
src/start.js
View file @
3234f47a
d3
=
(
function
(){
var
d3
=
{
version
:
"
3.3.1
2
"
};
// semver
var
d3
=
{
version
:
"
3.3.1
3
"
};
// semver
src/time/scale.js
View file @
3234f47a
import
"
../arrays/bisect
"
;
import
"
../arrays/range
"
;
import
"
../core/identity
"
;
import
"
../core/rebind
"
;
import
"
../core/true
"
;
import
"
../scale/linear
"
;
...
...
@@ -161,5 +162,7 @@ d3_time.scale = function() {
var
d3_time_scaleMilliseconds
=
{
range
:
function
(
start
,
stop
,
step
)
{
return
d3
.
range
(
+
start
,
+
stop
,
step
).
map
(
d3_time_scaleDate
);
}
},
floor
:
d3_identity
,
ceil
:
d3_identity
};
test/time/scale-test.js
View file @
3234f47a
...
...
@@ -43,6 +43,11 @@ suite.addBatch({
"
nicing a polylinear domain only affects the extent
"
:
function
(
linear
)
{
var
x
=
linear
().
domain
([
local
(
2009
,
0
,
1
,
0
,
12
),
local
(
2009
,
0
,
1
,
23
,
48
),
local
(
2009
,
0
,
2
,
23
,
48
)]).
nice
(
_
.
time
.
day
);
assert
.
deepEqual
(
x
.
domain
(),
[
local
(
2009
,
0
,
1
),
local
(
2009
,
0
,
1
,
23
,
48
),
local
(
2009
,
0
,
3
)]);
},
"
nice succeeds on sub-second intervals
"
:
function
(
scale
)
{
var
domain
=
[
local
(
2013
,
0
,
1
,
12
,
0
,
0
),
local
(
2013
,
0
,
1
,
12
,
0
,
8
)];
var
x
=
scale
().
domain
(
domain
);
assert
.
deepEqual
(
x
.
nice
().
domain
(),
domain
);
}
},
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment