forked from d3/d3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
502 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +1 @@ | |||
d3 = {version: "1.20.3"}; // semver | d3 = {version: "1.21.0"}; // semver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
d3.sum = function(array, f) { | |||
var s = 0, | |||
n = array.length, | |||
a, | |||
i = -1; | |||
|
|||
if (arguments.length === 1) { | |||
while (++i < n) if (!isNaN(a = +array[i])) s += a; | |||
} else { | |||
while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a; | |||
} | |||
|
|||
return s; | |||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
d3.time.format.iso = d3.time.format.utc("%Y-%m-%dT%H:%M:%SZ"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,48 @@ | |||
d3.time.format.utc = function(template) { | |||
var local = d3.time.format(template); | |||
|
|||
function format(date) { | |||
var utc = new d3_time_format_utc(); | |||
utc._ = date; | |||
return local(utc); | |||
} | |||
|
|||
format.parse = function(string) { | |||
try { | |||
d3_time = d3_time_format_utc; | |||
var date = local.parse(string); | |||
return date && date._; | |||
} finally { | |||
d3_time = Date; | |||
} | |||
}; | |||
|
|||
format.toString = local.toString; | |||
|
|||
return format; | |||
}; | |||
|
|||
function d3_time_format_utc() { | |||
this._ = new Date(Date.UTC.apply(this, arguments)); | |||
} | |||
|
|||
d3_time_format_utc.prototype = { | |||
getDate: function() { return this._.getUTCDate(); }, | |||
getDay: function() { return this._.getUTCDay(); }, | |||
getFullYear: function() { return this._.getUTCFullYear(); }, | |||
getHours: function() { return this._.getUTCHours(); }, | |||
getMilliseconds: function() { return this._.getUTCMilliseconds(); }, | |||
getMinutes: function() { return this._.getUTCMinutes(); }, | |||
getMonth: function() { return this._.getUTCMonth(); }, | |||
getSeconds: function() { return this._.getUTCSeconds(); }, | |||
getTimezoneOffset: function() { return 0; }, | |||
valueOf: function() { return this._.getTime(); }, | |||
setDate: function(x) { this._.setUTCDate(x); }, | |||
setDay: function(x) { this._.setUTCDay(x); }, | |||
setFullYear: function(x) { this._.setUTCFullYear(x); }, | |||
setHours: function(x) { this._.setUTCHours(x); }, | |||
setMilliseconds: function(x) { this._.setUTCMilliseconds(x); }, | |||
setMinutes: function(x) { this._.setUTCMinutes(x); }, | |||
setMonth: function(x) { this._.setUTCMonth(x); }, | |||
setSeconds: function(x) { this._.setUTCSeconds(x); } | |||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +1,3 @@ | |||
d3.time = {}; | d3.time = {}; | ||
|
|||
var d3_time = Date; |
Oops, something went wrong.