d3_rails 2.8.1 → 2.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/.DS_Store CHANGED
Binary file
data/README.md CHANGED
@@ -16,8 +16,8 @@ or you can use it to build dynamic pages (like jQuery).
16
16
 
17
17
  # D3 Version
18
18
 
19
- The current release of this gem is using **D3 v=2.8.1** (though for convenience I have left version 2.7.5 in the gem so you can still include your modules manually since rails will compile your javascripts into one file in the end anyway)
20
- **Last Updated 3-22-2012**
19
+ The current release of this gem is using **D3 v=2.9.1** (though for convenience I have left version 2.7.5 in the gem so you can still include your modules manually since rails will compile your javascripts into one file in the end anyway)
20
+ **Last Updated 4-23-2012**
21
21
 
22
22
  # Included Javascripts
23
23
  **minified js files are not included, since the rails asset pipeline sorta necessitates the compiling (and likely minifying) your js files for production**
data/d3_rails.gemspec CHANGED
@@ -5,7 +5,7 @@ require "d3_rails/version"
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "d3_rails"
7
7
  s.version = D3Rails::VERSION
8
- s.authors = ["Han"]
8
+ s.authors = ["Han Kang", "Cynthia Kiser", "Byron Anderson", "Johnathan Pulos"]
9
9
  s.email = ["han@logicallsat.com"]
10
10
  s.homepage = ""
11
11
  s.summary = %q{D3 automated install for Rails 3.1+}
@@ -1,3 +1,3 @@
1
1
  module D3Rails
2
- VERSION = "2.8.1"
2
+ VERSION = "2.9.1"
3
3
  end
Binary file
@@ -10,7 +10,7 @@ try {
10
10
  d3_style_setProperty.call(this, name, value + "", priority);
11
11
  };
12
12
  }
13
- d3 = {version: "2.8.1"}; // semver
13
+ d3 = {version: "2.9.1"}; // semver
14
14
  function d3_class(ctor, properties) {
15
15
  try {
16
16
  for (var key in properties) {
@@ -100,12 +100,20 @@ d3_class(d3_Map, {
100
100
 
101
101
  var d3_map_prefix = "\0", // prevent collision with built-ins
102
102
  d3_map_prefixCode = d3_map_prefix.charCodeAt(0);
103
+ function d3_identity(d) {
104
+ return d;
105
+ }
103
106
  function d3_this() {
104
107
  return this;
105
108
  }
106
- d3.functor = function(v) {
109
+ function d3_true() {
110
+ return true;
111
+ }
112
+ function d3_functor(v) {
107
113
  return typeof v === "function" ? v : function() { return v; };
108
- };
114
+ }
115
+
116
+ d3.functor = d3_functor;
109
117
  // Copies a variable number of methods from source to target.
110
118
  d3.rebind = function(target, source) {
111
119
  var i = 1, n = arguments.length, method;
@@ -484,7 +492,10 @@ d3.xhr = function(url, mime, callback) {
484
492
  req.open("GET", url, true);
485
493
  if (mime) req.setRequestHeader("Accept", mime);
486
494
  req.onreadystatechange = function() {
487
- if (req.readyState === 4) callback(req.status < 300 ? req : null);
495
+ if (req.readyState === 4) {
496
+ var s = req.status;
497
+ callback(s >= 200 && s < 300 || s === 304 ? req : null);
498
+ }
488
499
  };
489
500
  req.send(null);
490
501
  };
@@ -1120,7 +1131,7 @@ d3.interpolateObject = function(a, b) {
1120
1131
  };
1121
1132
  }
1122
1133
 
1123
- var d3_interpolate_number = /[-+]?(?:\d*\.?\d+)(?:[eE][-+]?\d+)?/g;
1134
+ var d3_interpolate_number = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
1124
1135
 
1125
1136
  function d3_interpolateByName(n) {
1126
1137
  return n == "transform"
@@ -2150,8 +2161,8 @@ function d3_transition(groups, id, time) {
2150
2161
  lock.active = id;
2151
2162
 
2152
2163
  tweens.forEach(function(key, value) {
2153
- if (tween = value.call(node, d, i)) {
2154
- tweened.push(tween);
2164
+ if (value = value.call(node, d, i)) {
2165
+ tweened.push(value);
2155
2166
  }
2156
2167
  });
2157
2168
 
@@ -3185,25 +3196,25 @@ d3.svg.arc = function() {
3185
3196
 
3186
3197
  arc.innerRadius = function(v) {
3187
3198
  if (!arguments.length) return innerRadius;
3188
- innerRadius = d3.functor(v);
3199
+ innerRadius = d3_functor(v);
3189
3200
  return arc;
3190
3201
  };
3191
3202
 
3192
3203
  arc.outerRadius = function(v) {
3193
3204
  if (!arguments.length) return outerRadius;
3194
- outerRadius = d3.functor(v);
3205
+ outerRadius = d3_functor(v);
3195
3206
  return arc;
3196
3207
  };
3197
3208
 
3198
3209
  arc.startAngle = function(v) {
3199
3210
  if (!arguments.length) return startAngle;
3200
- startAngle = d3.functor(v);
3211
+ startAngle = d3_functor(v);
3201
3212
  return arc;
3202
3213
  };
3203
3214
 
3204
3215
  arc.endAngle = function(v) {
3205
3216
  if (!arguments.length) return endAngle;
3206
- endAngle = d3.functor(v);
3217
+ endAngle = d3_functor(v);
3207
3218
  return arc;
3208
3219
  };
3209
3220
 
@@ -3239,36 +3250,66 @@ function d3_svg_arcEndAngle(d) {
3239
3250
  function d3_svg_line(projection) {
3240
3251
  var x = d3_svg_lineX,
3241
3252
  y = d3_svg_lineY,
3253
+ defined = d3_true,
3242
3254
  interpolate = d3_svg_lineInterpolatorDefault,
3243
- interpolator = d3_svg_lineInterpolators.get(interpolate),
3255
+ interpolator = d3_svg_lineLinear,
3244
3256
  tension = .7;
3245
3257
 
3246
- function line(d) {
3247
- return d.length < 1 ? null : "M" + interpolator(projection(d3_svg_linePoints(this, d, x, y)), tension);
3258
+ function line(data) {
3259
+ var segments = [],
3260
+ points = [],
3261
+ i = -1,
3262
+ n = data.length,
3263
+ d,
3264
+ fx = d3_functor(x),
3265
+ fy = d3_functor(y);
3266
+
3267
+ function segment() {
3268
+ segments.push("M", interpolator(projection(points), tension));
3269
+ }
3270
+
3271
+ while (++i < n) {
3272
+ if (defined.call(this, d = data[i], i)) {
3273
+ points.push([+fx.call(this, d, i), +fy.call(this, d, i)]);
3274
+ } else if (points.length) {
3275
+ segment();
3276
+ points = [];
3277
+ }
3278
+ }
3279
+
3280
+ if (points.length) segment();
3281
+
3282
+ return segments.length ? segments.join("") : null;
3248
3283
  }
3249
3284
 
3250
- line.x = function(v) {
3285
+ line.x = function(_) {
3251
3286
  if (!arguments.length) return x;
3252
- x = v;
3287
+ x = _;
3253
3288
  return line;
3254
3289
  };
3255
3290
 
3256
- line.y = function(v) {
3291
+ line.y = function(_) {
3257
3292
  if (!arguments.length) return y;
3258
- y = v;
3293
+ y = _;
3294
+ return line;
3295
+ };
3296
+
3297
+ line.defined = function(_) {
3298
+ if (!arguments.length) return defined;
3299
+ defined = _;
3259
3300
  return line;
3260
3301
  };
3261
3302
 
3262
- line.interpolate = function(v) {
3303
+ line.interpolate = function(_) {
3263
3304
  if (!arguments.length) return interpolate;
3264
- if (!d3_svg_lineInterpolators.has(v += "")) v = d3_svg_lineInterpolatorDefault;
3265
- interpolator = d3_svg_lineInterpolators.get(interpolate = v);
3305
+ if (!d3_svg_lineInterpolators.has(_ += "")) _ = d3_svg_lineInterpolatorDefault;
3306
+ interpolator = d3_svg_lineInterpolators.get(interpolate = _);
3266
3307
  return line;
3267
3308
  };
3268
3309
 
3269
- line.tension = function(v) {
3310
+ line.tension = function(_) {
3270
3311
  if (!arguments.length) return tension;
3271
- tension = v;
3312
+ tension = _;
3272
3313
  return line;
3273
3314
  };
3274
3315
 
@@ -3276,35 +3317,9 @@ function d3_svg_line(projection) {
3276
3317
  }
3277
3318
 
3278
3319
  d3.svg.line = function() {
3279
- return d3_svg_line(Object);
3320
+ return d3_svg_line(d3_identity);
3280
3321
  };
3281
3322
 
3282
- // Converts the specified array of data into an array of points
3283
- // (x-y tuples), by evaluating the specified `x` and `y` functions on each
3284
- // data point. The `this` context of the evaluated functions is the specified
3285
- // "self" object; each function is passed the current datum and index.
3286
- function d3_svg_linePoints(self, d, x, y) {
3287
- var points = [],
3288
- i = -1,
3289
- n = d.length,
3290
- fx = typeof x === "function",
3291
- fy = typeof y === "function",
3292
- value;
3293
- if (fx && fy) {
3294
- while (++i < n) points.push([
3295
- x.call(self, value = d[i], i),
3296
- y.call(self, value, i)
3297
- ]);
3298
- } else if (fx) {
3299
- while (++i < n) points.push([x.call(self, d[i], i), y]);
3300
- } else if (fy) {
3301
- while (++i < n) points.push([x, y.call(self, d[i], i)]);
3302
- } else {
3303
- while (++i < n) points.push([x, y]);
3304
- }
3305
- return points;
3306
- }
3307
-
3308
3323
  // The default `x` property, which references d[0].
3309
3324
  function d3_svg_lineX(d) {
3310
3325
  return d[0];
@@ -3640,8 +3655,7 @@ function d3_svg_lineMonotoneTangents(points) {
3640
3655
  // not monotonic, it's possible that the slope will be infinite, so we protect
3641
3656
  // against NaN by setting the coordinate to zero.
3642
3657
  i = -1; while (++i <= j) {
3643
- s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0])
3644
- / (6 * (1 + m[i] * m[i]));
3658
+ s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));
3645
3659
  tangents.push([s || 0, m[i] * s || 0]);
3646
3660
  }
3647
3661
 
@@ -3651,8 +3665,7 @@ function d3_svg_lineMonotoneTangents(points) {
3651
3665
  function d3_svg_lineMonotone(points) {
3652
3666
  return points.length < 3
3653
3667
  ? d3_svg_lineLinear(points)
3654
- : points[0] +
3655
- d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));
3668
+ : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));
3656
3669
  }
3657
3670
  d3.svg.line.radial = function() {
3658
3671
  var line = d3_svg_line(d3_svg_lineRadial);
@@ -3681,71 +3694,107 @@ function d3_svg_area(projection) {
3681
3694
  x1 = d3_svg_lineX,
3682
3695
  y0 = 0,
3683
3696
  y1 = d3_svg_lineY,
3684
- interpolate,
3685
- i0,
3686
- i1,
3697
+ defined = d3_true,
3698
+ interpolate = d3_svg_lineInterpolatorDefault,
3699
+ i0 = d3_svg_lineLinear,
3700
+ i1 = d3_svg_lineLinear,
3701
+ L = "L",
3687
3702
  tension = .7;
3688
3703
 
3689
- function area(d) {
3690
- if (d.length < 1) return null;
3691
- var points0 = d3_svg_linePoints(this, d, x0, y0),
3692
- points1 = d3_svg_linePoints(this, d, x0 === x1 ? d3_svg_areaX(points0) : x1, y0 === y1 ? d3_svg_areaY(points0) : y1);
3693
- return "M" + i0(projection(points1), tension)
3694
- + "L" + i1(projection(points0.reverse()), tension)
3695
- + "Z";
3704
+ function area(data) {
3705
+ var segments = [],
3706
+ points0 = [],
3707
+ points1 = [],
3708
+ i = -1,
3709
+ n = data.length,
3710
+ d,
3711
+ fx0 = d3_functor(x0),
3712
+ fy0 = d3_functor(y0),
3713
+ fx1 = x0 === x1 ? function() { return x; } : d3_functor(x1),
3714
+ fy1 = y0 === y1 ? function() { return y; } : d3_functor(y1),
3715
+ x,
3716
+ y;
3717
+
3718
+ function segment() {
3719
+ segments.push("M", i0(projection(points1), tension),
3720
+ L, i1(projection(points0.reverse()), tension),
3721
+ "Z");
3722
+ }
3723
+
3724
+ while (++i < n) {
3725
+ if (defined.call(this, d = data[i], i)) {
3726
+ points0.push([x = +fx0.call(this, d, i), y = +fy0.call(this, d, i)]);
3727
+ points1.push([+fx1.call(this, d, i), +fy1.call(this, d, i)]);
3728
+ } else if (points0.length) {
3729
+ segment();
3730
+ points0 = [];
3731
+ points1 = [];
3732
+ }
3733
+ }
3734
+
3735
+ if (points0.length) segment();
3736
+
3737
+ return segments.length ? segments.join("") : null;
3696
3738
  }
3697
3739
 
3698
- area.x = function(x) {
3740
+ area.x = function(_) {
3699
3741
  if (!arguments.length) return x1;
3700
- x0 = x1 = x;
3742
+ x0 = x1 = _;
3701
3743
  return area;
3702
3744
  };
3703
3745
 
3704
- area.x0 = function(x) {
3746
+ area.x0 = function(_) {
3705
3747
  if (!arguments.length) return x0;
3706
- x0 = x;
3748
+ x0 = _;
3707
3749
  return area;
3708
3750
  };
3709
3751
 
3710
- area.x1 = function(x) {
3752
+ area.x1 = function(_) {
3711
3753
  if (!arguments.length) return x1;
3712
- x1 = x;
3754
+ x1 = _;
3713
3755
  return area;
3714
3756
  };
3715
3757
 
3716
- area.y = function(y) {
3758
+ area.y = function(_) {
3717
3759
  if (!arguments.length) return y1;
3718
- y0 = y1 = y;
3760
+ y0 = y1 = _;
3719
3761
  return area;
3720
3762
  };
3721
3763
 
3722
- area.y0 = function(y) {
3764
+ area.y0 = function(_) {
3723
3765
  if (!arguments.length) return y0;
3724
- y0 = y;
3766
+ y0 = _;
3725
3767
  return area;
3726
3768
  };
3727
3769
 
3728
- area.y1 = function(y) {
3770
+ area.y1 = function(_) {
3729
3771
  if (!arguments.length) return y1;
3730
- y1 = y;
3772
+ y1 = _;
3731
3773
  return area;
3732
3774
  };
3733
3775
 
3734
- area.interpolate = function(x) {
3776
+ area.defined = function(_) {
3777
+ if (!arguments.length) return defined;
3778
+ defined = _;
3779
+ return area;
3780
+ };
3781
+
3782
+ area.interpolate = function(_) {
3735
3783
  if (!arguments.length) return interpolate;
3736
- if (!d3_svg_lineInterpolators.has(x += "")) x = d3_svg_lineInterpolatorDefault;
3737
- i0 = d3_svg_lineInterpolators.get(interpolate = x);
3784
+ if (!d3_svg_lineInterpolators.has(_ += "")) _ = d3_svg_lineInterpolatorDefault;
3785
+ i0 = d3_svg_lineInterpolators.get(interpolate = _);
3738
3786
  i1 = i0.reverse || i0;
3787
+ L = /-closed$/.test(_) ? "M" : "L";
3739
3788
  return area;
3740
3789
  };
3741
3790
 
3742
- area.tension = function(x) {
3791
+ area.tension = function(_) {
3743
3792
  if (!arguments.length) return tension;
3744
- tension = x;
3793
+ tension = _;
3745
3794
  return area;
3746
3795
  };
3747
3796
 
3748
- return area.interpolate("linear");
3797
+ return area;
3749
3798
  }
3750
3799
 
3751
3800
  d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;
@@ -3754,18 +3803,6 @@ d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;
3754
3803
  d3.svg.area = function() {
3755
3804
  return d3_svg_area(Object);
3756
3805
  };
3757
-
3758
- function d3_svg_areaX(points) {
3759
- return function(d, i) {
3760
- return points[i][0];
3761
- };
3762
- }
3763
-
3764
- function d3_svg_areaY(points) {
3765
- return function(d, i) {
3766
- return points[i][1];
3767
- };
3768
- }
3769
3806
  d3.svg.area.radial = function() {
3770
3807
  var area = d3_svg_area(d3_svg_lineRadial);
3771
3808
  area.radius = area.x, delete area.x;
@@ -3825,31 +3862,31 @@ d3.svg.chord = function() {
3825
3862
 
3826
3863
  chord.radius = function(v) {
3827
3864
  if (!arguments.length) return radius;
3828
- radius = d3.functor(v);
3865
+ radius = d3_functor(v);
3829
3866
  return chord;
3830
3867
  };
3831
3868
 
3832
3869
  chord.source = function(v) {
3833
3870
  if (!arguments.length) return source;
3834
- source = d3.functor(v);
3871
+ source = d3_functor(v);
3835
3872
  return chord;
3836
3873
  };
3837
3874
 
3838
3875
  chord.target = function(v) {
3839
3876
  if (!arguments.length) return target;
3840
- target = d3.functor(v);
3877
+ target = d3_functor(v);
3841
3878
  return chord;
3842
3879
  };
3843
3880
 
3844
3881
  chord.startAngle = function(v) {
3845
3882
  if (!arguments.length) return startAngle;
3846
- startAngle = d3.functor(v);
3883
+ startAngle = d3_functor(v);
3847
3884
  return chord;
3848
3885
  };
3849
3886
 
3850
3887
  chord.endAngle = function(v) {
3851
3888
  if (!arguments.length) return endAngle;
3852
- endAngle = d3.functor(v);
3889
+ endAngle = d3_functor(v);
3853
3890
  return chord;
3854
3891
  };
3855
3892
 
@@ -3891,13 +3928,13 @@ d3.svg.diagonal = function() {
3891
3928
 
3892
3929
  diagonal.source = function(x) {
3893
3930
  if (!arguments.length) return source;
3894
- source = d3.functor(x);
3931
+ source = d3_functor(x);
3895
3932
  return diagonal;
3896
3933
  };
3897
3934
 
3898
3935
  diagonal.target = function(x) {
3899
3936
  if (!arguments.length) return target;
3900
- target = d3.functor(x);
3937
+ target = d3_functor(x);
3901
3938
  return diagonal;
3902
3939
  };
3903
3940
 
@@ -3949,14 +3986,14 @@ d3.svg.symbol = function() {
3949
3986
 
3950
3987
  symbol.type = function(x) {
3951
3988
  if (!arguments.length) return type;
3952
- type = d3.functor(x);
3989
+ type = d3_functor(x);
3953
3990
  return symbol;
3954
3991
  };
3955
3992
 
3956
3993
  // size of symbol in square pixels
3957
3994
  symbol.size = function(x) {
3958
3995
  if (!arguments.length) return size;
3959
- size = d3.functor(x);
3996
+ size = d3_functor(x);
3960
3997
  return symbol;
3961
3998
  };
3962
3999
 
@@ -4633,6 +4670,7 @@ d3.behavior.drag = function() {
4633
4670
  offset = [0, 0];
4634
4671
  }
4635
4672
 
4673
+ d3_eventCancel();
4636
4674
  event_({type: "dragstart"});
4637
4675
 
4638
4676
  function point() {
@@ -4787,7 +4825,7 @@ d3.behavior.zoom = function() {
4787
4825
  function mouseup() {
4788
4826
  if (moved) d3_eventCancel();
4789
4827
  w.on("mousemove.zoom", null).on("mouseup.zoom", null);
4790
- if (moved && d3.event.target === eventTarget) w.on("click.zoom", click);
4828
+ if (moved && d3.event.target === eventTarget) w.on("click.zoom", click, true);
4791
4829
  }
4792
4830
 
4793
4831
  function click() {
@@ -5011,12 +5049,12 @@ d3.layout.chord = function() {
5011
5049
  value: v
5012
5050
  };
5013
5051
  }
5014
- groups.push({
5052
+ groups[di] = {
5015
5053
  index: di,
5016
5054
  startAngle: x0,
5017
5055
  endAngle: x,
5018
5056
  value: (x - x0) / k
5019
- });
5057
+ };
5020
5058
  x += padding;
5021
5059
  }
5022
5060
 
@@ -5229,7 +5267,7 @@ d3.layout.force = function() {
5229
5267
 
5230
5268
  force.linkDistance = function(x) {
5231
5269
  if (!arguments.length) return linkDistance;
5232
- linkDistance = d3.functor(x);
5270
+ linkDistance = d3_functor(x);
5233
5271
  return force;
5234
5272
  };
5235
5273
 
@@ -5238,7 +5276,7 @@ d3.layout.force = function() {
5238
5276
 
5239
5277
  force.linkStrength = function(x) {
5240
5278
  if (!arguments.length) return linkStrength;
5241
- linkStrength = d3.functor(x);
5279
+ linkStrength = d3_functor(x);
5242
5280
  return force;
5243
5281
  };
5244
5282
 
@@ -5366,7 +5404,7 @@ d3.layout.force = function() {
5366
5404
  // use `node.call(force.drag)` to make nodes draggable
5367
5405
  force.drag = function() {
5368
5406
  if (!drag) drag = d3.behavior.drag()
5369
- .origin(Object)
5407
+ .origin(d3_identity)
5370
5408
  .on("dragstart", dragstart)
5371
5409
  .on("drag", d3_layout_forceDrag)
5372
5410
  .on("dragend", d3_layout_forceDragEnd);
@@ -5589,7 +5627,7 @@ d3.layout.pie = function() {
5589
5627
  var d3_layout_pieSortByValue = {};
5590
5628
  // data is two-dimensional array of x,y; we populate y0
5591
5629
  d3.layout.stack = function() {
5592
- var values = Object,
5630
+ var values = d3_identity,
5593
5631
  order = d3_layout_stackOrderDefault,
5594
5632
  offset = d3_layout_stackOffsetZero,
5595
5633
  out = d3_layout_stackOut,
@@ -5854,12 +5892,14 @@ d3.layout.histogram = function() {
5854
5892
  }
5855
5893
 
5856
5894
  // Fill the bins, ignoring values outside the range.
5857
- i = -1; while(++i < n) {
5858
- x = values[i];
5859
- if ((x >= range[0]) && (x <= range[1])) {
5860
- bin = bins[d3.bisect(thresholds, x, 1, m) - 1];
5861
- bin.y += k;
5862
- bin.push(data[i]);
5895
+ if (m > 0) {
5896
+ i = -1; while(++i < n) {
5897
+ x = values[i];
5898
+ if ((x >= range[0]) && (x <= range[1])) {
5899
+ bin = bins[d3.bisect(thresholds, x, 1, m) - 1];
5900
+ bin.y += k;
5901
+ bin.push(data[i]);
5902
+ }
5863
5903
  }
5864
5904
  }
5865
5905
 
@@ -5882,7 +5922,7 @@ d3.layout.histogram = function() {
5882
5922
  // values.
5883
5923
  histogram.range = function(x) {
5884
5924
  if (!arguments.length) return ranger;
5885
- ranger = d3.functor(x);
5925
+ ranger = d3_functor(x);
5886
5926
  return histogram;
5887
5927
  };
5888
5928
 
@@ -5899,7 +5939,7 @@ d3.layout.histogram = function() {
5899
5939
  if (!arguments.length) return binner;
5900
5940
  binner = typeof x === "number"
5901
5941
  ? function(range) { return d3_layout_histogramBinFixed(range, x); }
5902
- : d3.functor(x);
5942
+ : d3_functor(x);
5903
5943
  return histogram;
5904
5944
  };
5905
5945
 
@@ -7585,7 +7625,7 @@ d3.geo.circle = function() {
7585
7625
  var origin = [0, 0],
7586
7626
  degrees = 90 - 1e-2,
7587
7627
  radians = degrees * d3_geo_radians,
7588
- arc = d3.geo.greatArc().target(Object);
7628
+ arc = d3.geo.greatArc().target(d3_identity);
7589
7629
 
7590
7630
  function circle() {
7591
7631
  // TODO render a circle as a Polygon
@@ -7603,7 +7643,7 @@ d3.geo.circle = function() {
7603
7643
  var clipType = d3_geo_type({
7604
7644
 
7605
7645
  FeatureCollection: function(o) {
7606
- var features = o.features.map(clipType).filter(Object);
7646
+ var features = o.features.map(clipType).filter(d3_identity);
7607
7647
  return features && (o = Object.create(o), o.features = features, o);
7608
7648
  },
7609
7649
 
@@ -7645,7 +7685,7 @@ d3.geo.circle = function() {
7645
7685
  },
7646
7686
 
7647
7687
  GeometryCollection: function(o) {
7648
- var geometries = o.geometries.map(clipType).filter(Object);
7688
+ var geometries = o.geometries.map(clipType).filter(d3_identity);
7649
7689
  return geometries.length && (o = Object.create(o), o.geometries = geometries, o);
7650
7690
  }
7651
7691
 
@@ -8809,7 +8849,7 @@ function d3_time_parseWeekday(date, string, i) {
8809
8849
  }
8810
8850
 
8811
8851
  var d3_time_weekdayAbbrevRe = /^(?:sun|mon|tue|wed|thu|fri|sat)/i,
8812
- d3_time_weekdayRe = /^(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/i;
8852
+ d3_time_weekdayRe = /^(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/i,
8813
8853
  d3_time_weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
8814
8854
 
8815
8855
  function d3_time_parseMonthAbbrev(date, string, i) {
metadata CHANGED
@@ -1,19 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: d3_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - Han
8
+ - Han Kang
9
+ - Cynthia Kiser
10
+ - Byron Anderson
11
+ - Johnathan Pulos
9
12
  autorequire:
10
13
  bindir: bin
11
14
  cert_chain: []
12
- date: 2012-03-23 00:00:00.000000000Z
15
+ date: 2012-04-24 00:00:00.000000000Z
13
16
  dependencies:
14
17
  - !ruby/object:Gem::Dependency
15
18
  name: railties
16
- requirement: &70307916627000 !ruby/object:Gem::Requirement
19
+ requirement: &70264089371760 !ruby/object:Gem::Requirement
17
20
  none: false
18
21
  requirements:
19
22
  - - ! '>='
@@ -21,10 +24,10 @@ dependencies:
21
24
  version: 3.1.0
22
25
  type: :runtime
23
26
  prerelease: false
24
- version_requirements: *70307916627000
27
+ version_requirements: *70264089371760
25
28
  - !ruby/object:Gem::Dependency
26
29
  name: bundler
27
- requirement: &70307916626380 !ruby/object:Gem::Requirement
30
+ requirement: &70264089371020 !ruby/object:Gem::Requirement
28
31
  none: false
29
32
  requirements:
30
33
  - - ~>
@@ -32,10 +35,10 @@ dependencies:
32
35
  version: 1.0.0
33
36
  type: :development
34
37
  prerelease: false
35
- version_requirements: *70307916626380
38
+ version_requirements: *70264089371020
36
39
  - !ruby/object:Gem::Dependency
37
40
  name: rails
38
- requirement: &70307916625920 !ruby/object:Gem::Requirement
41
+ requirement: &70264089370340 !ruby/object:Gem::Requirement
39
42
  none: false
40
43
  requirements:
41
44
  - - ~>
@@ -43,7 +46,7 @@ dependencies:
43
46
  version: '3.1'
44
47
  type: :development
45
48
  prerelease: false
46
- version_requirements: *70307916625920
49
+ version_requirements: *70264089370340
47
50
  description: Gem installation of javascript framework for data visualization, D3
48
51
  email:
49
52
  - han@logicallsat.com
@@ -187,4 +190,3 @@ signing_key:
187
190
  specification_version: 3
188
191
  summary: D3 automated install for Rails 3.1+
189
192
  test_files: []
190
- has_rdoc: