mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
Merge branch 'master' of https://github.com/dump247/morris.js into dump247-master
Conflicts: morris.min.js
This commit is contained in:
commit
67251e854b
@ -267,7 +267,7 @@ class Morris.Line
|
||||
#
|
||||
drawSeries: ->
|
||||
for i in [@seriesCoords.length-1..0]
|
||||
coords = @seriesCoords[i]
|
||||
coords = $.map(@seriesCoords[i], (c) -> c)
|
||||
if coords.length > 1
|
||||
path = @createPath coords, @options.marginTop, @left, @options.marginTop + @height, @left + @width
|
||||
@r.path(path)
|
||||
@ -287,9 +287,8 @@ class Morris.Line
|
||||
|
||||
# create a path for a data series
|
||||
#
|
||||
createPath: (all_coords, top, left, bottom, right) ->
|
||||
createPath: (coords, top, left, bottom, right) ->
|
||||
path = ""
|
||||
coords = $.map(all_coords, (c) -> c)
|
||||
if @options.smooth
|
||||
grads = @gradients coords
|
||||
for i in [0..coords.length-1]
|
||||
|
11
morris.js
11
morris.js
@ -314,7 +314,9 @@
|
||||
Line.prototype.drawSeries = function() {
|
||||
var c, circle, coords, i, path, _i, _j, _ref, _ref1, _results;
|
||||
for (i = _i = _ref = this.seriesCoords.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; i = _ref <= 0 ? ++_i : --_i) {
|
||||
coords = this.seriesCoords[i];
|
||||
coords = $.map(this.seriesCoords[i], function(c) {
|
||||
return c;
|
||||
});
|
||||
if (coords.length > 1) {
|
||||
path = this.createPath(coords, this.options.marginTop, this.left, this.options.marginTop + this.height, this.left + this.width);
|
||||
this.r.path(path).attr('stroke', this.options.lineColors[i]).attr('stroke-width', this.options.lineWidth);
|
||||
@ -349,12 +351,9 @@
|
||||
return _results;
|
||||
};
|
||||
|
||||
Line.prototype.createPath = function(all_coords, top, left, bottom, right) {
|
||||
var c, coords, g, grads, i, ix, lc, lg, path, x1, x2, y1, y2, _i, _ref;
|
||||
Line.prototype.createPath = function(coords, top, left, bottom, right) {
|
||||
var c, g, grads, i, ix, lc, lg, path, x1, x2, y1, y2, _i, _ref;
|
||||
path = "";
|
||||
coords = $.map(all_coords, function(c) {
|
||||
return c;
|
||||
});
|
||||
if (this.options.smooth) {
|
||||
grads = this.gradients(coords);
|
||||
for (i = _i = 0, _ref = coords.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
|
||||
|
2
morris.min.js
vendored
2
morris.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user