morrisjs-rails 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 557908fc7a271ae63e08996d9431037e79544876
4
- data.tar.gz: 59a397f9c96a4fd6cad0be9e5af25dd3500c6330
3
+ metadata.gz: 45e6c7dea9af4ad673b2099893a2660870ab6a08
4
+ data.tar.gz: faf9927817aa156869084ff6670de11f0043fab4
5
5
  SHA512:
6
- metadata.gz: 093630ae1057b764c4c1699cd23b05e504b65843d1083bd22fe97c2146345a6b3c18fd3a1af34e2fb19bc3aad350615e302eeae409103bfcf55a9361d5ae9836
7
- data.tar.gz: 04b2169c8e6cb7934ae6c849fffb55622b538d91af1dfea6d3c10a424f550bce9a062d03ee5e5836bbb7cc558477c7658139f35d20d83b4cf6c5377b36322b33
6
+ metadata.gz: b4b2f994aa2b24003880404f4e5a4ee1bb33d90fae36341d2e2ae0665c1d993afffaf765e044f3823b5465468c10c4649c1c62f74e53f00f3d3a9b2ec277b13a
7
+ data.tar.gz: 0b4aaeddc989fefc7a28f718773eb724a5c5fbfa419704e81571cd73c4f484d42f6d03d005815e6962635e4761e37f7833b8c85f52dea4bcf7f9add8478029d6
@@ -1,5 +1,5 @@
1
1
  module Morrisjs
2
2
  module Rails
3
- VERSION = "0.4.3"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
@@ -1,9 +1,16 @@
1
+ /* @license
2
+ morris.js v0.5.0
3
+ Copyright 2014 Olly Smith All rights reserved.
4
+ Licensed under the BSD-2-Clause License.
5
+ */
6
+
7
+
1
8
  (function() {
2
9
  var $, Morris, minutesSpecHelper, secondsSpecHelper,
3
10
  __slice = [].slice,
11
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
4
12
  __hasProp = {}.hasOwnProperty,
5
13
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
6
- __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
7
14
  __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
8
15
 
9
16
  Morris = window.Morris = {};
@@ -11,7 +18,6 @@
11
18
  $ = jQuery;
12
19
 
13
20
  Morris.EventEmitter = (function() {
14
-
15
21
  function EventEmitter() {}
16
22
 
17
23
  EventEmitter.prototype.on = function(name, handler) {
@@ -65,17 +71,17 @@
65
71
  };
66
72
 
67
73
  Morris.Grid = (function(_super) {
68
-
69
74
  __extends(Grid, _super);
70
75
 
71
76
  function Grid(options) {
77
+ this.resizeHandler = __bind(this.resizeHandler, this);
72
78
  var _this = this;
73
79
  if (typeof options.element === 'string') {
74
80
  this.el = $(document.getElementById(options.element));
75
81
  } else {
76
82
  this.el = $(options.element);
77
83
  }
78
- if (!(this.el != null) || this.el.length === 0) {
84
+ if ((this.el == null) || this.el.length === 0) {
79
85
  throw new Error("Graph container element not found");
80
86
  }
81
87
  if (this.el.css('position') === 'static') {
@@ -89,16 +95,32 @@
89
95
  this.elementWidth = null;
90
96
  this.elementHeight = null;
91
97
  this.dirty = false;
98
+ this.selectFrom = null;
92
99
  if (this.init) {
93
100
  this.init();
94
101
  }
95
102
  this.setData(this.options.data);
96
103
  this.el.bind('mousemove', function(evt) {
97
- var offset;
104
+ var left, offset, right, width, x;
98
105
  offset = _this.el.offset();
99
- return _this.fire('hovermove', evt.pageX - offset.left, evt.pageY - offset.top);
106
+ x = evt.pageX - offset.left;
107
+ if (_this.selectFrom) {
108
+ left = _this.data[_this.hitTest(Math.min(x, _this.selectFrom))]._x;
109
+ right = _this.data[_this.hitTest(Math.max(x, _this.selectFrom))]._x;
110
+ width = right - left;
111
+ return _this.selectionRect.attr({
112
+ x: left,
113
+ width: width
114
+ });
115
+ } else {
116
+ return _this.fire('hovermove', x, evt.pageY - offset.top);
117
+ }
100
118
  });
101
- this.el.bind('mouseout', function(evt) {
119
+ this.el.bind('mouseleave', function(evt) {
120
+ if (_this.selectFrom) {
121
+ _this.selectionRect.hide();
122
+ _this.selectFrom = null;
123
+ }
102
124
  return _this.fire('hoverout');
103
125
  });
104
126
  this.el.bind('touchstart touchmove touchend', function(evt) {
@@ -113,6 +135,31 @@
113
135
  offset = _this.el.offset();
114
136
  return _this.fire('gridclick', evt.pageX - offset.left, evt.pageY - offset.top);
115
137
  });
138
+ if (this.options.rangeSelect) {
139
+ this.selectionRect = this.raphael.rect(0, 0, 0, this.el.innerHeight()).attr({
140
+ fill: this.options.rangeSelectColor,
141
+ stroke: false
142
+ }).toBack().hide();
143
+ this.el.bind('mousedown', function(evt) {
144
+ var offset;
145
+ offset = _this.el.offset();
146
+ return _this.startRange(evt.pageX - offset.left);
147
+ });
148
+ this.el.bind('mouseup', function(evt) {
149
+ var offset;
150
+ offset = _this.el.offset();
151
+ _this.endRange(evt.pageX - offset.left);
152
+ return _this.fire('hovermove', evt.pageX - offset.left, evt.pageY - offset.top);
153
+ });
154
+ }
155
+ if (this.options.resize) {
156
+ $(window).bind('resize', function(evt) {
157
+ if (_this.timeoutId != null) {
158
+ window.clearTimeout(_this.timeoutId);
159
+ }
160
+ return _this.timeoutId = window.setTimeout(_this.resizeHandler, 100);
161
+ });
162
+ }
116
163
  if (this.postInit) {
117
164
  this.postInit();
118
165
  }
@@ -143,16 +190,19 @@
143
190
  goalLineColors: ['#666633', '#999966', '#cc6666', '#663333'],
144
191
  events: [],
145
192
  eventStrokeWidth: 1.0,
146
- eventLineColors: ['#005a04', '#ccffbb', '#3a5f0b', '#005502']
193
+ eventLineColors: ['#005a04', '#ccffbb', '#3a5f0b', '#005502'],
194
+ rangeSelect: null,
195
+ rangeSelectColor: '#eef',
196
+ resize: false
147
197
  };
148
198
 
149
199
  Grid.prototype.setData = function(data, redraw) {
150
- var e, idx, index, maxGoal, minGoal, ret, row, step, total, y, ykey, ymax, ymin, yval;
200
+ var e, idx, index, maxGoal, minGoal, ret, row, step, total, y, ykey, ymax, ymin, yval, _ref;
151
201
  if (redraw == null) {
152
202
  redraw = true;
153
203
  }
154
204
  this.options.data = data;
155
- if (!(data != null) || data.length === 0) {
205
+ if ((data == null) || data.length === 0) {
156
206
  this.data = [];
157
207
  this.raphael.clear();
158
208
  if (this.hover != null) {
@@ -163,8 +213,8 @@
163
213
  ymax = this.cumulative ? 0 : null;
164
214
  ymin = this.cumulative ? 0 : null;
165
215
  if (this.options.goals.length > 0) {
166
- minGoal = Math.min.apply(null, this.options.goals);
167
- maxGoal = Math.max.apply(null, this.options.goals);
216
+ minGoal = Math.min.apply(Math, this.options.goals);
217
+ maxGoal = Math.max.apply(Math, this.options.goals);
168
218
  ymin = ymin != null ? Math.min(ymin, minGoal) : minGoal;
169
219
  ymax = ymax != null ? Math.max(ymax, maxGoal) : maxGoal;
170
220
  }
@@ -173,7 +223,9 @@
173
223
  _results = [];
174
224
  for (index = _i = 0, _len = data.length; _i < _len; index = ++_i) {
175
225
  row = data[index];
176
- ret = {};
226
+ ret = {
227
+ src: row
228
+ };
177
229
  ret.label = row[this.options.xkey];
178
230
  if (this.options.parseTime) {
179
231
  ret.x = Morris.parseDate(ret.label);
@@ -234,19 +286,23 @@
234
286
  this.xmin = this.data[0].x;
235
287
  this.xmax = this.data[this.data.length - 1].x;
236
288
  this.events = [];
237
- if (this.options.parseTime && this.options.events.length > 0) {
238
- this.events = (function() {
239
- var _i, _len, _ref, _results;
240
- _ref = this.options.events;
241
- _results = [];
242
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
243
- e = _ref[_i];
244
- _results.push(Morris.parseDate(e));
245
- }
246
- return _results;
247
- }).call(this);
248
- this.xmax = Math.max(this.xmax, Math.max.apply(null, this.events));
249
- this.xmin = Math.min(this.xmin, Math.min.apply(null, this.events));
289
+ if (this.options.events.length > 0) {
290
+ if (this.options.parseTime) {
291
+ this.events = (function() {
292
+ var _i, _len, _ref, _results;
293
+ _ref = this.options.events;
294
+ _results = [];
295
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
296
+ e = _ref[_i];
297
+ _results.push(Morris.parseDate(e));
298
+ }
299
+ return _results;
300
+ }).call(this);
301
+ } else {
302
+ this.events = this.options.events;
303
+ }
304
+ this.xmax = Math.max(this.xmax, Math.max.apply(Math, this.events));
305
+ this.xmin = Math.min(this.xmin, Math.min.apply(Math, this.events));
250
306
  }
251
307
  if (this.xmin === this.xmax) {
252
308
  this.xmin -= 1;
@@ -260,7 +316,7 @@
260
316
  }
261
317
  this.ymax += 1;
262
318
  }
263
- if (this.options.axes === true || this.options.grid === true) {
319
+ if (((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'y') || this.options.grid === true) {
264
320
  if (this.options.ymax === this.gridDefaults.ymax && this.options.ymin === this.gridDefaults.ymin) {
265
321
  this.grid = this.autoGridLines(this.ymin, this.ymax, this.options.numLines);
266
322
  this.ymin = Math.min(this.ymin, this.grid[0]);
@@ -268,9 +324,9 @@
268
324
  } else {
269
325
  step = (this.ymax - this.ymin) / (this.options.numLines - 1);
270
326
  this.grid = (function() {
271
- var _i, _ref, _ref1, _results;
327
+ var _i, _ref1, _ref2, _results;
272
328
  _results = [];
273
- for (y = _i = _ref = this.ymin, _ref1 = this.ymax; _ref <= _ref1 ? _i <= _ref1 : _i >= _ref1; y = _i += step) {
329
+ for (y = _i = _ref1 = this.ymin, _ref2 = this.ymax; step > 0 ? _i <= _ref2 : _i >= _ref2; y = _i += step) {
274
330
  _results.push(y);
275
331
  }
276
332
  return _results;
@@ -330,7 +386,7 @@
330
386
  grid = (function() {
331
387
  var _i, _results;
332
388
  _results = [];
333
- for (y = _i = gmin; gmin <= gmax ? _i <= gmax : _i >= gmax; y = _i += step) {
389
+ for (y = _i = gmin; step > 0 ? _i <= gmax : _i >= gmax; y = _i += step) {
334
390
  _results.push(parseFloat(y.toFixed(1 - smag)));
335
391
  }
336
392
  return _results;
@@ -339,7 +395,7 @@
339
395
  grid = (function() {
340
396
  var _i, _results;
341
397
  _results = [];
342
- for (y = _i = gmin; gmin <= gmax ? _i <= gmax : _i >= gmax; y = _i += step) {
398
+ for (y = _i = gmin; step > 0 ? _i <= gmax : _i >= gmax; y = _i += step) {
343
399
  _results.push(y);
344
400
  }
345
401
  return _results;
@@ -349,7 +405,7 @@
349
405
  };
350
406
 
351
407
  Grid.prototype._calc = function() {
352
- var bottomOffsets, gridLine, h, i, w, yLabelWidths;
408
+ var bottomOffsets, gridLine, h, i, w, yLabelWidths, _ref, _ref1;
353
409
  w = this.el.width();
354
410
  h = this.el.height();
355
411
  if (this.elementWidth !== w || this.elementHeight !== h || this.dirty) {
@@ -360,22 +416,24 @@
360
416
  this.right = this.elementWidth - this.options.padding;
361
417
  this.top = this.options.padding;
362
418
  this.bottom = this.elementHeight - this.options.padding;
363
- if (this.options.axes) {
419
+ if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'y') {
364
420
  yLabelWidths = (function() {
365
- var _i, _len, _ref, _results;
366
- _ref = this.grid;
421
+ var _i, _len, _ref1, _results;
422
+ _ref1 = this.grid;
367
423
  _results = [];
368
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
369
- gridLine = _ref[_i];
424
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
425
+ gridLine = _ref1[_i];
370
426
  _results.push(this.measureText(this.yAxisFormat(gridLine)).width);
371
427
  }
372
428
  return _results;
373
429
  }).call(this);
374
430
  this.left += Math.max.apply(Math, yLabelWidths);
431
+ }
432
+ if ((_ref1 = this.options.axes) === true || _ref1 === 'both' || _ref1 === 'x') {
375
433
  bottomOffsets = (function() {
376
- var _i, _ref, _results;
434
+ var _i, _ref2, _results;
377
435
  _results = [];
378
- for (i = _i = 0, _ref = this.data.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
436
+ for (i = _i = 0, _ref2 = this.data.length; 0 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 0 <= _ref2 ? ++_i : --_i) {
379
437
  _results.push(this.measureText(this.data[i].text, -this.options.xLabelAngle).height);
380
438
  }
381
439
  return _results;
@@ -438,25 +496,17 @@
438
496
  }
439
497
  };
440
498
 
441
- Grid.prototype.updateHover = function(x, y) {
442
- var hit, _ref;
443
- hit = this.hitTest(x, y);
444
- if (hit != null) {
445
- return (_ref = this.hover).update.apply(_ref, hit);
446
- }
447
- };
448
-
449
499
  Grid.prototype.drawGrid = function() {
450
- var lineY, y, _i, _len, _ref, _results;
451
- if (this.options.grid === false && this.options.axes === false) {
500
+ var lineY, y, _i, _len, _ref, _ref1, _ref2, _results;
501
+ if (this.options.grid === false && ((_ref = this.options.axes) !== true && _ref !== 'both' && _ref !== 'y')) {
452
502
  return;
453
503
  }
454
- _ref = this.grid;
504
+ _ref1 = this.grid;
455
505
  _results = [];
456
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
457
- lineY = _ref[_i];
506
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
507
+ lineY = _ref1[_i];
458
508
  y = this.transY(lineY);
459
- if (this.options.axes) {
509
+ if ((_ref2 = this.options.axes) === true || _ref2 === 'both' || _ref2 === 'y') {
460
510
  this.drawYAxisLabel(this.left - this.options.padding / 2, y, this.yAxisFormat(lineY));
461
511
  }
462
512
  if (this.options.grid) {
@@ -508,6 +558,34 @@
508
558
  return this.raphael.path(path).attr('stroke', this.options.gridLineColor).attr('stroke-width', this.options.gridStrokeWidth);
509
559
  };
510
560
 
561
+ Grid.prototype.startRange = function(x) {
562
+ this.hover.hide();
563
+ this.selectFrom = x;
564
+ return this.selectionRect.attr({
565
+ x: x,
566
+ width: 0
567
+ }).show();
568
+ };
569
+
570
+ Grid.prototype.endRange = function(x) {
571
+ var end, start;
572
+ if (this.selectFrom) {
573
+ start = Math.min(this.selectFrom, x);
574
+ end = Math.max(this.selectFrom, x);
575
+ this.options.rangeSelect.call(this.el, {
576
+ start: this.data[this.hitTest(start)].x,
577
+ end: this.data[this.hitTest(end)].x
578
+ });
579
+ return this.selectFrom = null;
580
+ }
581
+ };
582
+
583
+ Grid.prototype.resizeHandler = function() {
584
+ this.timeoutId = null;
585
+ this.raphael.setSize(this.el.width(), this.el.height());
586
+ return this.redraw();
587
+ };
588
+
511
589
  return Grid;
512
590
 
513
591
  })(Morris.EventEmitter);
@@ -570,7 +648,6 @@
570
648
  };
571
649
 
572
650
  Morris.Hover = (function() {
573
-
574
651
  Hover.defaults = {
575
652
  "class": 'morris-hover morris-default-style'
576
653
  };
@@ -632,16 +709,12 @@
632
709
  })();
633
710
 
634
711
  Morris.Line = (function(_super) {
635
-
636
712
  __extends(Line, _super);
637
713
 
638
714
  function Line(options) {
639
715
  this.hilight = __bind(this.hilight, this);
640
-
641
716
  this.onHoverOut = __bind(this.onHoverOut, this);
642
-
643
717
  this.onHoverMove = __bind(this.onHoverMove, this);
644
-
645
718
  this.onGridClick = __bind(this.onGridClick, this);
646
719
  if (!(this instanceof Morris.Line)) {
647
720
  return new Morris.Line(options);
@@ -650,12 +723,6 @@
650
723
  }
651
724
 
652
725
  Line.prototype.init = function() {
653
- this.pointGrow = Raphael.animation({
654
- r: this.options.pointSize + 3
655
- }, 25, 'linear');
656
- this.pointShrink = Raphael.animation({
657
- r: this.options.pointSize
658
- }, 25, 'linear');
659
726
  if (this.options.hideHover !== 'always') {
660
727
  this.hover = new Morris.Hover({
661
728
  parent: this.el
@@ -670,7 +737,7 @@
670
737
  lineWidth: 3,
671
738
  pointSize: 4,
672
739
  lineColors: ['#0b62a4', '#7A92A3', '#4da74d', '#afd8f8', '#edc240', '#cb4b4b', '#9440ed'],
673
- pointWidths: [1],
740
+ pointStrokeWidths: [1],
674
741
  pointStrokeColors: ['#ffffff'],
675
742
  pointFillColors: [],
676
743
  smooth: true,
@@ -707,7 +774,7 @@
707
774
  }
708
775
  return _results1;
709
776
  }).call(this);
710
- _results.push(row._ymax = Math.min.apply(null, [this.bottom].concat((function() {
777
+ _results.push(row._ymax = Math.min.apply(Math, [this.bottom].concat((function() {
711
778
  var _j, _len1, _ref1, _results1;
712
779
  _ref1 = row._y;
713
780
  _results1 = [];
@@ -723,7 +790,7 @@
723
790
  return _results;
724
791
  };
725
792
 
726
- Line.prototype.hitTest = function(x, y) {
793
+ Line.prototype.hitTest = function(x) {
727
794
  var index, r, _i, _len, _ref;
728
795
  if (this.data.length === 0) {
729
796
  return null;
@@ -740,13 +807,13 @@
740
807
 
741
808
  Line.prototype.onGridClick = function(x, y) {
742
809
  var index;
743
- index = this.hitTest(x, y);
744
- return this.fire('click', index, this.options.data[index], x, y);
810
+ index = this.hitTest(x);
811
+ return this.fire('click', index, this.data[index].src, x, y);
745
812
  };
746
813
 
747
814
  Line.prototype.onHoverMove = function(x, y) {
748
815
  var index;
749
- index = this.hitTest(x, y);
816
+ index = this.hitTest(x);
750
817
  return this.displayHoverForRow(index);
751
818
  };
752
819
 
@@ -777,7 +844,7 @@
777
844
  content += "<div class='morris-hover-point' style='color: " + (this.colorFor(row, j, 'label')) + "'>\n " + this.options.labels[j] + ":\n " + (this.yLabelFormat(y)) + "\n</div>";
778
845
  }
779
846
  if (typeof this.options.hoverCallback === 'function') {
780
- content = this.options.hoverCallback(index, this.options, content);
847
+ content = this.options.hoverCallback(index, this.options, content, row.src);
781
848
  }
782
849
  return [content, row._x, row._ymax];
783
850
  };
@@ -788,7 +855,7 @@
788
855
  var _i, _ref, _ref1, _results;
789
856
  _results = [];
790
857
  for (i = _i = 0, _ref = this.options.ykeys.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
791
- smooth = this.options.smooth === true || (_ref1 = this.options.ykeys[i], __indexOf.call(this.options.smooth, _ref1) >= 0);
858
+ smooth = typeof this.options.smooth === "boolean" ? this.options.smooth : (_ref1 = this.options.ykeys[i], __indexOf.call(this.options.smooth, _ref1) >= 0);
792
859
  coords = (function() {
793
860
  var _j, _len, _ref2, _results1;
794
861
  _ref2 = this.data;
@@ -828,7 +895,8 @@
828
895
  };
829
896
 
830
897
  Line.prototype.draw = function() {
831
- if (this.options.axes) {
898
+ var _ref;
899
+ if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'x') {
832
900
  this.drawXAxis();
833
901
  }
834
902
  this.drawSeries();
@@ -855,7 +923,7 @@
855
923
  label.transform("t" + offset + ",0...");
856
924
  }
857
925
  labelBox = label.getBBox();
858
- if ((!(prevLabelMargin != null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) {
926
+ if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) {
859
927
  if (_this.options.xLabelAngle !== 0) {
860
928
  margin = 1.25 * _this.options.gridTextSize / Math.sin(_this.options.xLabelAngle * Math.PI / 180.0);
861
929
  prevAngleMargin = labelBox.x - margin;
@@ -914,7 +982,7 @@
914
982
  row = _ref[_i];
915
983
  circle = null;
916
984
  if (row._y[index] != null) {
917
- circle = this.drawLinePoint(row._x, row._y[index], this.options.pointSize, this.colorFor(row, index, 'point'), index);
985
+ circle = this.drawLinePoint(row._x, row._y[index], this.colorFor(row, index, 'point'), index);
918
986
  }
919
987
  _results.push(this.seriesPoints[index].push(circle));
920
988
  }
@@ -925,7 +993,7 @@
925
993
  var path;
926
994
  path = this.paths[index];
927
995
  if (path !== null) {
928
- return this.drawLinePath(path, this.colorFor(null, index, 'line'));
996
+ return this.drawLinePath(path, this.colorFor(null, index, 'line'), index);
929
997
  }
930
998
  };
931
999
 
@@ -1001,14 +1069,14 @@
1001
1069
  if (this.prevHilight !== null && this.prevHilight !== index) {
1002
1070
  for (i = _i = 0, _ref = this.seriesPoints.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
1003
1071
  if (this.seriesPoints[i][this.prevHilight]) {
1004
- this.seriesPoints[i][this.prevHilight].animate(this.pointShrink);
1072
+ this.seriesPoints[i][this.prevHilight].animate(this.pointShrinkSeries(i));
1005
1073
  }
1006
1074
  }
1007
1075
  }
1008
1076
  if (index !== null && this.prevHilight !== index) {
1009
1077
  for (i = _j = 0, _ref1 = this.seriesPoints.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {
1010
1078
  if (this.seriesPoints[i][index]) {
1011
- this.seriesPoints[i][index].animate(this.pointGrow);
1079
+ this.seriesPoints[i][index].animate(this.pointGrowSeries(i));
1012
1080
  }
1013
1081
  }
1014
1082
  }
@@ -1029,22 +1097,50 @@
1029
1097
  return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
1030
1098
  };
1031
1099
 
1032
- Line.prototype.drawLinePath = function(path, lineColor) {
1033
- return this.raphael.path(path).attr('stroke', lineColor).attr('stroke-width', this.options.lineWidth);
1100
+ Line.prototype.drawLinePath = function(path, lineColor, lineIndex) {
1101
+ return this.raphael.path(path).attr('stroke', lineColor).attr('stroke-width', this.lineWidthForSeries(lineIndex));
1034
1102
  };
1035
1103
 
1036
- Line.prototype.drawLinePoint = function(xPos, yPos, size, pointColor, lineIndex) {
1037
- return this.raphael.circle(xPos, yPos, size).attr('fill', pointColor).attr('stroke-width', this.strokeWidthForSeries(lineIndex)).attr('stroke', this.strokeForSeries(lineIndex));
1104
+ Line.prototype.drawLinePoint = function(xPos, yPos, pointColor, lineIndex) {
1105
+ return this.raphael.circle(xPos, yPos, this.pointSizeForSeries(lineIndex)).attr('fill', pointColor).attr('stroke-width', this.pointStrokeWidthForSeries(lineIndex)).attr('stroke', this.pointStrokeColorForSeries(lineIndex));
1038
1106
  };
1039
1107
 
1040
- Line.prototype.strokeWidthForSeries = function(index) {
1041
- return this.options.pointWidths[index % this.options.pointWidths.length];
1108
+ Line.prototype.pointStrokeWidthForSeries = function(index) {
1109
+ return this.options.pointStrokeWidths[index % this.options.pointStrokeWidths.length];
1042
1110
  };
1043
1111
 
1044
- Line.prototype.strokeForSeries = function(index) {
1112
+ Line.prototype.pointStrokeColorForSeries = function(index) {
1045
1113
  return this.options.pointStrokeColors[index % this.options.pointStrokeColors.length];
1046
1114
  };
1047
1115
 
1116
+ Line.prototype.lineWidthForSeries = function(index) {
1117
+ if (this.options.lineWidth instanceof Array) {
1118
+ return this.options.lineWidth[index % this.options.lineWidth.length];
1119
+ } else {
1120
+ return this.options.lineWidth;
1121
+ }
1122
+ };
1123
+
1124
+ Line.prototype.pointSizeForSeries = function(index) {
1125
+ if (this.options.pointSize instanceof Array) {
1126
+ return this.options.pointSize[index % this.options.pointSize.length];
1127
+ } else {
1128
+ return this.options.pointSize;
1129
+ }
1130
+ };
1131
+
1132
+ Line.prototype.pointGrowSeries = function(index) {
1133
+ return Raphael.animation({
1134
+ r: this.pointSizeForSeries(index) + 3
1135
+ }, 25, 'linear');
1136
+ };
1137
+
1138
+ Line.prototype.pointShrinkSeries = function(index) {
1139
+ return Raphael.animation({
1140
+ r: this.pointSizeForSeries(index)
1141
+ }, 25, 'linear');
1142
+ };
1143
+
1048
1144
  return Line;
1049
1145
 
1050
1146
  })(Morris.Grid);
@@ -1151,6 +1247,18 @@
1151
1247
  return d.setMonth(d.getMonth() + 1);
1152
1248
  }
1153
1249
  },
1250
+ "week": {
1251
+ span: 604800000,
1252
+ start: function(d) {
1253
+ return new Date(d.getFullYear(), d.getMonth(), d.getDate());
1254
+ },
1255
+ fmt: function(d) {
1256
+ return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1)) + "-" + (Morris.pad2(d.getDate()));
1257
+ },
1258
+ incr: function(d) {
1259
+ return d.setDate(d.getDate() + 7);
1260
+ }
1261
+ },
1154
1262
  "day": {
1155
1263
  span: 86400000,
1156
1264
  start: function(d) {
@@ -1176,7 +1284,7 @@
1176
1284
  "second": secondsSpecHelper(1)
1177
1285
  };
1178
1286
 
1179
- Morris.AUTO_LABEL_ORDER = ["decade", "year", "month", "day", "hour", "30min", "15min", "10min", "5min", "minute", "30sec", "15sec", "10sec", "5sec", "second"];
1287
+ Morris.AUTO_LABEL_ORDER = ["decade", "year", "month", "week", "day", "hour", "30min", "15min", "10min", "5min", "minute", "30sec", "15sec", "10sec", "5sec", "second"];
1180
1288
 
1181
1289
  Morris.Area = (function(_super) {
1182
1290
  var areaDefaults;
@@ -1271,7 +1379,7 @@
1271
1379
  };
1272
1380
 
1273
1381
  Area.prototype.drawFilledPath = function(path, fill) {
1274
- return this.raphael.path(path).attr('fill', fill).attr('fill-opacity', this.options.fillOpacity).attr('stroke-width', 0);
1382
+ return this.raphael.path(path).attr('fill', fill).attr('fill-opacity', this.options.fillOpacity).attr('stroke', 'none');
1275
1383
  };
1276
1384
 
1277
1385
  return Area;
@@ -1279,14 +1387,11 @@
1279
1387
  })(Morris.Line);
1280
1388
 
1281
1389
  Morris.Bar = (function(_super) {
1282
-
1283
1390
  __extends(Bar, _super);
1284
1391
 
1285
1392
  function Bar(options) {
1286
1393
  this.onHoverOut = __bind(this.onHoverOut, this);
1287
-
1288
1394
  this.onHoverMove = __bind(this.onHoverMove, this);
1289
-
1290
1395
  this.onGridClick = __bind(this.onGridClick, this);
1291
1396
  if (!(this instanceof Morris.Bar)) {
1292
1397
  return new Morris.Bar(options);
@@ -1312,6 +1417,8 @@
1312
1417
  barSizeRatio: 0.75,
1313
1418
  barGap: 3,
1314
1419
  barColors: ['#0b62a4', '#7a92a3', '#4da74d', '#afd8f8', '#edc240', '#cb4b4b', '#9440ed'],
1420
+ barOpacity: 1.0,
1421
+ barRadius: [0, 0, 0, 0],
1315
1422
  xLabelMargin: 50
1316
1423
  };
1317
1424
 
@@ -1349,7 +1456,8 @@
1349
1456
  };
1350
1457
 
1351
1458
  Bar.prototype.draw = function() {
1352
- if (this.options.axes) {
1459
+ var _ref;
1460
+ if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'x') {
1353
1461
  this.drawXAxis();
1354
1462
  }
1355
1463
  return this.drawSeries();
@@ -1357,7 +1465,7 @@
1357
1465
 
1358
1466
  Bar.prototype.drawXAxis = function() {
1359
1467
  var i, label, labelBox, margin, offset, prevAngleMargin, prevLabelMargin, row, textBox, ypos, _i, _ref, _results;
1360
- ypos = this.bottom + this.options.padding / 2;
1468
+ ypos = this.bottom + (this.options.xAxisLabelTopPadding || this.options.padding / 2);
1361
1469
  prevLabelMargin = null;
1362
1470
  prevAngleMargin = null;
1363
1471
  _results = [];
@@ -1372,7 +1480,7 @@
1372
1480
  offset = -0.5 * textBox.width * Math.cos(this.options.xLabelAngle * Math.PI / 180.0);
1373
1481
  label.transform("t" + offset + ",0...");
1374
1482
  }
1375
- if ((!(prevLabelMargin != null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < this.el.width()) {
1483
+ if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < this.el.width()) {
1376
1484
  if (this.options.xLabelAngle !== 0) {
1377
1485
  margin = 1.25 * this.options.gridTextSize / Math.sin(this.options.xLabelAngle * Math.PI / 180.0);
1378
1486
  prevAngleMargin = labelBox.x - margin;
@@ -1386,11 +1494,15 @@
1386
1494
  };
1387
1495
 
1388
1496
  Bar.prototype.drawSeries = function() {
1389
- var barWidth, bottom, groupWidth, idx, lastTop, left, leftPadding, numBars, row, sidx, size, top, ypos, zeroPos;
1497
+ var barWidth, bottom, groupWidth, idx, lastTop, left, leftPadding, numBars, row, sidx, size, spaceLeft, top, ypos, zeroPos;
1390
1498
  groupWidth = this.width / this.options.data.length;
1391
1499
  numBars = this.options.stacked != null ? 1 : this.options.ykeys.length;
1392
1500
  barWidth = (groupWidth * this.options.barSizeRatio - this.options.barGap * (numBars - 1)) / numBars;
1393
- leftPadding = groupWidth * (1 - this.options.barSizeRatio) / 2;
1501
+ if (this.options.barSize) {
1502
+ barWidth = Math.min(barWidth, this.options.barSize);
1503
+ }
1504
+ spaceLeft = groupWidth - barWidth * numBars - this.options.barGap * (numBars - 1);
1505
+ leftPadding = spaceLeft / 2;
1394
1506
  zeroPos = this.ymin <= 0 && this.ymax >= 0 ? this.transY(0) : null;
1395
1507
  return this.bars = (function() {
1396
1508
  var _i, _len, _ref, _results;
@@ -1421,7 +1533,7 @@
1421
1533
  if (this.options.stacked) {
1422
1534
  top -= lastTop;
1423
1535
  }
1424
- this.drawBar(left, top, barWidth, size, this.colorFor(row, sidx, 'bar'));
1536
+ this.drawBar(left, top, barWidth, size, this.colorFor(row, sidx, 'bar'), this.options.barOpacity, this.options.barRadius);
1425
1537
  _results1.push(lastTop += size);
1426
1538
  } else {
1427
1539
  _results1.push(null);
@@ -1453,7 +1565,7 @@
1453
1565
  }
1454
1566
  };
1455
1567
 
1456
- Bar.prototype.hitTest = function(x, y) {
1568
+ Bar.prototype.hitTest = function(x) {
1457
1569
  if (this.data.length === 0) {
1458
1570
  return null;
1459
1571
  }
@@ -1463,13 +1575,13 @@
1463
1575
 
1464
1576
  Bar.prototype.onGridClick = function(x, y) {
1465
1577
  var index;
1466
- index = this.hitTest(x, y);
1467
- return this.fire('click', index, this.options.data[index], x, y);
1578
+ index = this.hitTest(x);
1579
+ return this.fire('click', index, this.data[index].src, x, y);
1468
1580
  };
1469
1581
 
1470
1582
  Bar.prototype.onHoverMove = function(x, y) {
1471
1583
  var index, _ref;
1472
- index = this.hitTest(x, y);
1584
+ index = this.hitTest(x);
1473
1585
  return (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(index));
1474
1586
  };
1475
1587
 
@@ -1489,7 +1601,7 @@
1489
1601
  content += "<div class='morris-hover-point' style='color: " + (this.colorFor(row, j, 'label')) + "'>\n " + this.options.labels[j] + ":\n " + (this.yLabelFormat(y)) + "\n</div>";
1490
1602
  }
1491
1603
  if (typeof this.options.hoverCallback === 'function') {
1492
- content = this.options.hoverCallback(index, this.options, content);
1604
+ content = this.options.hoverCallback(index, this.options, content, row.src);
1493
1605
  }
1494
1606
  x = this.left + (index + 0.5) * this.width / this.data.length;
1495
1607
  return [content, x];
@@ -1500,8 +1612,22 @@
1500
1612
  return label = this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
1501
1613
  };
1502
1614
 
1503
- Bar.prototype.drawBar = function(xPos, yPos, width, height, barColor) {
1504
- return this.raphael.rect(xPos, yPos, width, height).attr('fill', barColor).attr('stroke-width', 0);
1615
+ Bar.prototype.drawBar = function(xPos, yPos, width, height, barColor, opacity, radiusArray) {
1616
+ var maxRadius, path;
1617
+ maxRadius = Math.max.apply(Math, radiusArray);
1618
+ if (maxRadius === 0 || maxRadius > height) {
1619
+ path = this.raphael.rect(xPos, yPos, width, height);
1620
+ } else {
1621
+ path = this.raphael.path(this.roundedRect(xPos, yPos, width, height, radiusArray));
1622
+ }
1623
+ return path.attr('fill', barColor).attr('fill-opacity', opacity).attr('stroke', 'none');
1624
+ };
1625
+
1626
+ Bar.prototype.roundedRect = function(x, y, w, h, r) {
1627
+ if (r == null) {
1628
+ r = [0, 0, 0, 0];
1629
+ }
1630
+ return ["M", x, r[0] + y, "Q", x, y, x + r[0], y, "L", x + w - r[1], y, "Q", x + w, y, x + w, y + r[1], "L", x + w, y + h - r[2], "Q", x + w, y + h, x + w - r[2], y + h, "L", x + r[3], y + h, "Q", x, y + h, x, y + h - r[3], "Z"];
1505
1631
  };
1506
1632
 
1507
1633
  return Bar;
@@ -1509,55 +1635,51 @@
1509
1635
  })(Morris.Grid);
1510
1636
 
1511
1637
  Morris.Donut = (function(_super) {
1512
-
1513
1638
  __extends(Donut, _super);
1514
1639
 
1515
1640
  Donut.prototype.defaults = {
1516
1641
  colors: ['#0B62A4', '#3980B5', '#679DC6', '#95BBD7', '#B0CCE1', '#095791', '#095085', '#083E67', '#052C48', '#042135'],
1517
1642
  backgroundColor: '#FFFFFF',
1518
1643
  labelColor: '#000000',
1519
- formatter: Morris.commas
1644
+ formatter: Morris.commas,
1645
+ resize: false
1520
1646
  };
1521
1647
 
1522
1648
  function Donut(options) {
1649
+ this.resizeHandler = __bind(this.resizeHandler, this);
1523
1650
  this.select = __bind(this.select, this);
1524
-
1525
1651
  this.click = __bind(this.click, this);
1526
-
1527
- var row;
1652
+ var _this = this;
1528
1653
  if (!(this instanceof Morris.Donut)) {
1529
1654
  return new Morris.Donut(options);
1530
1655
  }
1656
+ this.options = $.extend({}, this.defaults, options);
1531
1657
  if (typeof options.element === 'string') {
1532
1658
  this.el = $(document.getElementById(options.element));
1533
1659
  } else {
1534
1660
  this.el = $(options.element);
1535
1661
  }
1536
- this.options = $.extend({}, this.defaults, options);
1537
1662
  if (this.el === null || this.el.length === 0) {
1538
1663
  throw new Error("Graph placeholder not found.");
1539
1664
  }
1540
1665
  if (options.data === void 0 || options.data.length === 0) {
1541
1666
  return;
1542
1667
  }
1543
- this.data = options.data;
1544
- this.values = (function() {
1545
- var _i, _len, _ref, _results;
1546
- _ref = this.data;
1547
- _results = [];
1548
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1549
- row = _ref[_i];
1550
- _results.push(parseFloat(row.value));
1551
- }
1552
- return _results;
1553
- }).call(this);
1554
- this.redraw();
1668
+ this.raphael = new Raphael(this.el[0]);
1669
+ if (this.options.resize) {
1670
+ $(window).bind('resize', function(evt) {
1671
+ if (_this.timeoutId != null) {
1672
+ window.clearTimeout(_this.timeoutId);
1673
+ }
1674
+ return _this.timeoutId = window.setTimeout(_this.resizeHandler, 100);
1675
+ });
1676
+ }
1677
+ this.setData(options.data);
1555
1678
  }
1556
1679
 
1557
1680
  Donut.prototype.redraw = function() {
1558
1681
  var C, cx, cy, i, idx, last, max_value, min, next, seg, total, value, w, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
1559
- this.el.empty();
1560
- this.raphael = new Raphael(this.el[0]);
1682
+ this.raphael.clear();
1561
1683
  cx = this.el.width() / 2;
1562
1684
  cy = this.el.height() / 2;
1563
1685
  w = (Math.min(cx, cy) - 10) / 3;
@@ -1576,7 +1698,7 @@
1576
1698
  for (i = _j = 0, _len1 = _ref1.length; _j < _len1; i = ++_j) {
1577
1699
  value = _ref1[i];
1578
1700
  next = last + min + C * (value / total);
1579
- seg = new Morris.DonutSegment(cx, cy, w * 2, w, last, next, this.options.colors[idx % this.options.colors.length], this.options.backgroundColor, idx, this.raphael);
1701
+ seg = new Morris.DonutSegment(cx, cy, w * 2, w, last, next, this.data[i].color || this.options.colors[idx % this.options.colors.length], this.options.backgroundColor, idx, this.raphael);
1580
1702
  seg.render();
1581
1703
  this.segments.push(seg);
1582
1704
  seg.on('hover', this.select);
@@ -1586,16 +1708,7 @@
1586
1708
  }
1587
1709
  this.text1 = this.drawEmptyDonutLabel(cx, cy - 10, this.options.labelColor, 15, 800);
1588
1710
  this.text2 = this.drawEmptyDonutLabel(cx, cy + 10, this.options.labelColor, 14);
1589
- max_value = Math.max.apply(null, (function() {
1590
- var _k, _len2, _ref2, _results;
1591
- _ref2 = this.values;
1592
- _results = [];
1593
- for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
1594
- value = _ref2[_k];
1595
- _results.push(value);
1596
- }
1597
- return _results;
1598
- }).call(this));
1711
+ max_value = Math.max.apply(Math, this.values);
1599
1712
  idx = 0;
1600
1713
  _ref2 = this.values;
1601
1714
  _results = [];
@@ -1610,6 +1723,22 @@
1610
1723
  return _results;
1611
1724
  };
1612
1725
 
1726
+ Donut.prototype.setData = function(data) {
1727
+ var row;
1728
+ this.data = data;
1729
+ this.values = (function() {
1730
+ var _i, _len, _ref, _results;
1731
+ _ref = this.data;
1732
+ _results = [];
1733
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1734
+ row = _ref[_i];
1735
+ _results.push(parseFloat(row.value));
1736
+ }
1737
+ return _results;
1738
+ }).call(this);
1739
+ return this.redraw();
1740
+ };
1741
+
1613
1742
  Donut.prototype.click = function(idx) {
1614
1743
  return this.fire('click', idx, this.data[idx]);
1615
1744
  };
@@ -1662,12 +1791,17 @@
1662
1791
  return text;
1663
1792
  };
1664
1793
 
1794
+ Donut.prototype.resizeHandler = function() {
1795
+ this.timeoutId = null;
1796
+ this.raphael.setSize(this.el.width(), this.el.height());
1797
+ return this.redraw();
1798
+ };
1799
+
1665
1800
  return Donut;
1666
1801
 
1667
1802
  })(Morris.EventEmitter);
1668
1803
 
1669
1804
  Morris.DonutSegment = (function(_super) {
1670
-
1671
1805
  __extends(DonutSegment, _super);
1672
1806
 
1673
1807
  function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) {
@@ -1680,9 +1814,7 @@
1680
1814
  this.index = index;
1681
1815
  this.raphael = raphael;
1682
1816
  this.deselect = __bind(this.deselect, this);
1683
-
1684
1817
  this.select = __bind(this.select, this);
1685
-
1686
1818
  this.sin_p0 = Math.sin(p0);
1687
1819
  this.cos_p0 = Math.cos(p0);
1688
1820
  this.sin_p1 = Math.sin(p1);
@@ -1,2 +1,2 @@
1
- .morris-hover{position:absolute;z-index:1000;}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255, 255, 255, 0.8);border:solid 2px rgba(230, 230, 230, 0.8);font-family:sans-serif;font-size:12px;text-align:center;}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0;}
2
- .morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0;}
1
+ .morris-hover{position:absolute;z-index:1000}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255,255,255,0.8);border:solid 2px rgba(230,230,230,0.8);font-family:sans-serif;font-size:12px;text-align:center}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0}
2
+ .morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0}
metadata CHANGED
@@ -1,33 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morrisjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - beanie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-19 00:00:00.000000000 Z
11
+ date: 2014-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>'
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.1'
20
- - - <
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '5'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - '>'
27
+ - - ">"
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.1'
30
- - - <
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '5'
33
33
  description: morris.js for the Rails Asset Pipeline
@@ -37,11 +37,11 @@ executables: []
37
37
  extensions: []
38
38
  extra_rdoc_files: []
39
39
  files:
40
- - lib/morrisjs-rails/version.rb
40
+ - README.md
41
41
  - lib/morrisjs-rails.rb
42
+ - lib/morrisjs-rails/version.rb
42
43
  - vendor/assets/javascripts/morris.js
43
44
  - vendor/assets/stylesheets/morris.css
44
- - README.md
45
45
  homepage: https://github.com/beanieboi/morrisjs-rails
46
46
  licenses:
47
47
  - MIT
@@ -52,19 +52,18 @@ require_paths:
52
52
  - lib
53
53
  required_ruby_version: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - '>='
55
+ - - ">="
56
56
  - !ruby/object:Gem::Version
57
57
  version: '0'
58
58
  required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
64
  rubyforge_project:
65
- rubygems_version: 2.0.2
65
+ rubygems_version: 2.2.2
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: morris.js for the Rails Asset Pipeline
69
69
  test_files: []
70
- has_rdoc: