d3_rails 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module D3Rails
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -10,7 +10,7 @@ try {
10
10
  d3_style_setProperty.call(this, name, value + "", priority);
11
11
  };
12
12
  }
13
- d3 = {version: "2.6.0"}; // semver
13
+ d3 = {version: "2.6.1"}; // semver
14
14
  var d3_array = d3_arraySlice; // conversion for NodeLists
15
15
 
16
16
  function d3_arrayCopy(pseudoarray) {
@@ -977,9 +977,9 @@ function d3_interpolateByName(n) {
977
977
  d3.interpolators = [
978
978
  d3.interpolateObject,
979
979
  function(a, b) { return (b instanceof Array) && d3.interpolateArray(a, b); },
980
- function(a, b) { return (typeof b === "string") && d3.interpolateString(a + "", b); },
981
- function(a, b) { return (typeof b === "string" ? b in d3_rgb_names || /^(#|rgb\(|hsl\()/.test(b) : b instanceof d3_Rgb || b instanceof d3_Hsl) && d3.interpolateRgb(a + "", b); },
982
- function(a, b) { return (typeof b === "number") && d3.interpolateNumber(+a, b); }
980
+ function(a, b) { return (typeof a === "string" || typeof b === "string") && d3.interpolateString(a + "", b + ""); },
981
+ function(a, b) { return (typeof b === "string" ? b in d3_rgb_names || /^(#|rgb\(|hsl\()/.test(b) : b instanceof d3_Rgb || b instanceof d3_Hsl) && d3.interpolateRgb(a, b); },
982
+ function(a, b) { return !isNaN(a = +a) && !isNaN(b = +b) && d3.interpolateNumber(a, b); }
983
983
  ];
984
984
  function d3_uninterpolateNumber(a, b) {
985
985
  b = b - (a = +a) ? 1 / (b - a) : 0;
@@ -2542,7 +2542,7 @@ function d3_scale_log(linear, log) {
2542
2542
  if (arguments.length < 2) format = d3_scale_logFormat;
2543
2543
  if (arguments.length < 1) return format;
2544
2544
  var k = n / scale.ticks().length,
2545
- f = log === d3_scale_logn ? (e = -1e-15, Math.floor) : (e = 1e-15, Math.ceil),
2545
+ f = log === d3_scale_logn ? (e = -1e-12, Math.floor) : (e = 1e-12, Math.ceil),
2546
2546
  e;
2547
2547
  return function(d) {
2548
2548
  return d / pow(f(log(d) + e)) < k ? format(d) : "";
@@ -3646,7 +3646,7 @@ function d3_svg_mousePoint(container, e) {
3646
3646
  var point = (container.ownerSVGElement || container).createSVGPoint();
3647
3647
  if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {
3648
3648
  var svg = d3.select(document.body)
3649
- .append("svg:svg")
3649
+ .append("svg")
3650
3650
  .style("position", "absolute")
3651
3651
  .style("top", 0)
3652
3652
  .style("left", 0);
@@ -3807,13 +3807,13 @@ d3.svg.axis = function() {
3807
3807
  // Minor ticks.
3808
3808
  var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide),
3809
3809
  subtick = g.selectAll(".minor").data(subticks, String),
3810
- subtickEnter = subtick.enter().insert("svg:line", "g").attr("class", "tick minor").style("opacity", 1e-6),
3810
+ subtickEnter = subtick.enter().insert("line", "g").attr("class", "tick minor").style("opacity", 1e-6),
3811
3811
  subtickExit = transition(subtick.exit()).style("opacity", 1e-6).remove(),
3812
3812
  subtickUpdate = transition(subtick).style("opacity", 1);
3813
3813
 
3814
3814
  // Major ticks.
3815
3815
  var tick = g.selectAll("g").data(ticks, String),
3816
- tickEnter = tick.enter().insert("svg:g", "path").style("opacity", 1e-6),
3816
+ tickEnter = tick.enter().insert("g", "path").style("opacity", 1e-6),
3817
3817
  tickExit = transition(tick.exit()).style("opacity", 1e-6).remove(),
3818
3818
  tickUpdate = transition(tick).style("opacity", 1),
3819
3819
  tickTransform;
@@ -3821,7 +3821,7 @@ d3.svg.axis = function() {
3821
3821
  // Domain.
3822
3822
  var range = d3_scaleRange(scale),
3823
3823
  path = g.selectAll(".domain").data([0]),
3824
- pathEnter = path.enter().append("svg:path").attr("class", "domain"),
3824
+ pathEnter = path.enter().append("path").attr("class", "domain"),
3825
3825
  pathUpdate = transition(path);
3826
3826
 
3827
3827
  // Stash a snapshot of the new scale, and retrieve the old snapshot.
@@ -3829,8 +3829,8 @@ d3.svg.axis = function() {
3829
3829
  scale0 = this.__chart__ || scale1;
3830
3830
  this.__chart__ = scale1;
3831
3831
 
3832
- tickEnter.append("svg:line").attr("class", "tick");
3833
- tickEnter.append("svg:text");
3832
+ tickEnter.append("line").attr("class", "tick");
3833
+ tickEnter.append("text");
3834
3834
  tickUpdate.select("text").text(tickFormat);
3835
3835
 
3836
3836
  switch (orient) {
@@ -3991,19 +3991,19 @@ d3.svg.brush = function() {
3991
3991
  e;
3992
3992
 
3993
3993
  // An invisible, mouseable area for starting a new brush.
3994
- bg.enter().append("svg:rect")
3994
+ bg.enter().append("rect")
3995
3995
  .attr("class", "background")
3996
3996
  .style("visibility", "hidden")
3997
3997
  .style("pointer-events", "all")
3998
3998
  .style("cursor", "crosshair");
3999
3999
 
4000
4000
  // The visible brush extent; style this as you like!
4001
- fg.enter().append("svg:rect")
4001
+ fg.enter().append("rect")
4002
4002
  .attr("class", "extent")
4003
4003
  .style("cursor", "move");
4004
4004
 
4005
4005
  // More invisible rects for resizing the extent.
4006
- tz.enter().append("svg:rect")
4006
+ tz.enter().append("rect")
4007
4007
  .attr("class", function(d) { return "resize " + d; })
4008
4008
  .attr("width", 6)
4009
4009
  .attr("height", 6)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: d3_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-24 00:00:00.000000000Z
12
+ date: 2011-12-02 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70330434135240 !ruby/object:Gem::Requirement
16
+ requirement: &70155104062120 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70330434135240
24
+ version_requirements: *70155104062120
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &70330434134480 !ruby/object:Gem::Requirement
27
+ requirement: &70155104061620 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70330434134480
35
+ version_requirements: *70155104061620
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rails
38
- requirement: &70330434133920 !ruby/object:Gem::Requirement
38
+ requirement: &70155104061160 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '3.1'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70330434133920
46
+ version_requirements: *70155104061160
47
47
  description: Gem installation of javascript framework for data visualization, D3
48
48
  email:
49
49
  - han@logicallsat.com