Recompile.
This commit is contained in:
parent
e19d676bc4
commit
a738317adb
|
@ -1,2 +1,2 @@
|
||||||
.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;}
|
.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}
|
||||||
.morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0;}
|
.morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0}
|
||||||
|
|
30
morris.js
30
morris.js
|
@ -11,7 +11,6 @@
|
||||||
$ = jQuery;
|
$ = jQuery;
|
||||||
|
|
||||||
Morris.EventEmitter = (function() {
|
Morris.EventEmitter = (function() {
|
||||||
|
|
||||||
function EventEmitter() {}
|
function EventEmitter() {}
|
||||||
|
|
||||||
EventEmitter.prototype.on = function(name, handler) {
|
EventEmitter.prototype.on = function(name, handler) {
|
||||||
|
@ -65,7 +64,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
Morris.Grid = (function(_super) {
|
Morris.Grid = (function(_super) {
|
||||||
|
|
||||||
__extends(Grid, _super);
|
__extends(Grid, _super);
|
||||||
|
|
||||||
function Grid(options) {
|
function Grid(options) {
|
||||||
|
@ -75,7 +73,7 @@
|
||||||
} else {
|
} else {
|
||||||
this.el = $(options.element);
|
this.el = $(options.element);
|
||||||
}
|
}
|
||||||
if (!(this.el != null) || this.el.length === 0) {
|
if ((this.el == null) || this.el.length === 0) {
|
||||||
throw new Error("Graph container element not found");
|
throw new Error("Graph container element not found");
|
||||||
}
|
}
|
||||||
if (this.el.css('position') === 'static') {
|
if (this.el.css('position') === 'static') {
|
||||||
|
@ -187,7 +185,7 @@
|
||||||
redraw = true;
|
redraw = true;
|
||||||
}
|
}
|
||||||
this.options.data = data;
|
this.options.data = data;
|
||||||
if (!(data != null) || data.length === 0) {
|
if ((data == null) || data.length === 0) {
|
||||||
this.data = [];
|
this.data = [];
|
||||||
this.raphael.clear();
|
this.raphael.clear();
|
||||||
if (this.hover != null) {
|
if (this.hover != null) {
|
||||||
|
@ -305,7 +303,7 @@
|
||||||
this.grid = (function() {
|
this.grid = (function() {
|
||||||
var _i, _ref1, _ref2, _results;
|
var _i, _ref1, _ref2, _results;
|
||||||
_results = [];
|
_results = [];
|
||||||
for (y = _i = _ref1 = this.ymin, _ref2 = this.ymax; _ref1 <= _ref2 ? _i <= _ref2 : _i >= _ref2; y = _i += step) {
|
for (y = _i = _ref1 = this.ymin, _ref2 = this.ymax; step > 0 ? _i <= _ref2 : _i >= _ref2; y = _i += step) {
|
||||||
_results.push(y);
|
_results.push(y);
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
|
@ -365,7 +363,7 @@
|
||||||
grid = (function() {
|
grid = (function() {
|
||||||
var _i, _results;
|
var _i, _results;
|
||||||
_results = [];
|
_results = [];
|
||||||
for (y = _i = gmin; gmin <= gmax ? _i <= gmax : _i >= gmax; y = _i += step) {
|
for (y = _i = gmin; step > 0 ? _i <= gmax : _i >= gmax; y = _i += step) {
|
||||||
_results.push(parseFloat(y.toFixed(1 - smag)));
|
_results.push(parseFloat(y.toFixed(1 - smag)));
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
|
@ -374,7 +372,7 @@
|
||||||
grid = (function() {
|
grid = (function() {
|
||||||
var _i, _results;
|
var _i, _results;
|
||||||
_results = [];
|
_results = [];
|
||||||
for (y = _i = gmin; gmin <= gmax ? _i <= gmax : _i >= gmax; y = _i += step) {
|
for (y = _i = gmin; step > 0 ? _i <= gmax : _i >= gmax; y = _i += step) {
|
||||||
_results.push(y);
|
_results.push(y);
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
|
@ -621,7 +619,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
Morris.Hover = (function() {
|
Morris.Hover = (function() {
|
||||||
|
|
||||||
Hover.defaults = {
|
Hover.defaults = {
|
||||||
"class": 'morris-hover morris-default-style'
|
"class": 'morris-hover morris-default-style'
|
||||||
};
|
};
|
||||||
|
@ -683,16 +680,12 @@
|
||||||
})();
|
})();
|
||||||
|
|
||||||
Morris.Line = (function(_super) {
|
Morris.Line = (function(_super) {
|
||||||
|
|
||||||
__extends(Line, _super);
|
__extends(Line, _super);
|
||||||
|
|
||||||
function Line(options) {
|
function Line(options) {
|
||||||
this.hilight = __bind(this.hilight, this);
|
this.hilight = __bind(this.hilight, this);
|
||||||
|
|
||||||
this.onHoverOut = __bind(this.onHoverOut, this);
|
this.onHoverOut = __bind(this.onHoverOut, this);
|
||||||
|
|
||||||
this.onHoverMove = __bind(this.onHoverMove, this);
|
this.onHoverMove = __bind(this.onHoverMove, this);
|
||||||
|
|
||||||
this.onGridClick = __bind(this.onGridClick, this);
|
this.onGridClick = __bind(this.onGridClick, this);
|
||||||
if (!(this instanceof Morris.Line)) {
|
if (!(this instanceof Morris.Line)) {
|
||||||
return new Morris.Line(options);
|
return new Morris.Line(options);
|
||||||
|
@ -901,7 +894,7 @@
|
||||||
label.transform("t" + offset + ",0...");
|
label.transform("t" + offset + ",0...");
|
||||||
}
|
}
|
||||||
labelBox = label.getBBox();
|
labelBox = label.getBBox();
|
||||||
if ((!(prevLabelMargin != null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) {
|
if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) {
|
||||||
if (_this.options.xLabelAngle !== 0) {
|
if (_this.options.xLabelAngle !== 0) {
|
||||||
margin = 1.25 * _this.options.gridTextSize / Math.sin(_this.options.xLabelAngle * Math.PI / 180.0);
|
margin = 1.25 * _this.options.gridTextSize / Math.sin(_this.options.xLabelAngle * Math.PI / 180.0);
|
||||||
prevAngleMargin = labelBox.x - margin;
|
prevAngleMargin = labelBox.x - margin;
|
||||||
|
@ -1365,14 +1358,11 @@
|
||||||
})(Morris.Line);
|
})(Morris.Line);
|
||||||
|
|
||||||
Morris.Bar = (function(_super) {
|
Morris.Bar = (function(_super) {
|
||||||
|
|
||||||
__extends(Bar, _super);
|
__extends(Bar, _super);
|
||||||
|
|
||||||
function Bar(options) {
|
function Bar(options) {
|
||||||
this.onHoverOut = __bind(this.onHoverOut, this);
|
this.onHoverOut = __bind(this.onHoverOut, this);
|
||||||
|
|
||||||
this.onHoverMove = __bind(this.onHoverMove, this);
|
this.onHoverMove = __bind(this.onHoverMove, this);
|
||||||
|
|
||||||
this.onGridClick = __bind(this.onGridClick, this);
|
this.onGridClick = __bind(this.onGridClick, this);
|
||||||
if (!(this instanceof Morris.Bar)) {
|
if (!(this instanceof Morris.Bar)) {
|
||||||
return new Morris.Bar(options);
|
return new Morris.Bar(options);
|
||||||
|
@ -1459,7 +1449,7 @@
|
||||||
offset = -0.5 * textBox.width * Math.cos(this.options.xLabelAngle * Math.PI / 180.0);
|
offset = -0.5 * textBox.width * Math.cos(this.options.xLabelAngle * Math.PI / 180.0);
|
||||||
label.transform("t" + offset + ",0...");
|
label.transform("t" + offset + ",0...");
|
||||||
}
|
}
|
||||||
if ((!(prevLabelMargin != null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < this.el.width()) {
|
if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < this.el.width()) {
|
||||||
if (this.options.xLabelAngle !== 0) {
|
if (this.options.xLabelAngle !== 0) {
|
||||||
margin = 1.25 * this.options.gridTextSize / Math.sin(this.options.xLabelAngle * Math.PI / 180.0);
|
margin = 1.25 * this.options.gridTextSize / Math.sin(this.options.xLabelAngle * Math.PI / 180.0);
|
||||||
prevAngleMargin = labelBox.x - margin;
|
prevAngleMargin = labelBox.x - margin;
|
||||||
|
@ -1596,7 +1586,6 @@
|
||||||
})(Morris.Grid);
|
})(Morris.Grid);
|
||||||
|
|
||||||
Morris.Donut = (function(_super) {
|
Morris.Donut = (function(_super) {
|
||||||
|
|
||||||
__extends(Donut, _super);
|
__extends(Donut, _super);
|
||||||
|
|
||||||
Donut.prototype.defaults = {
|
Donut.prototype.defaults = {
|
||||||
|
@ -1608,9 +1597,7 @@
|
||||||
|
|
||||||
function Donut(options) {
|
function Donut(options) {
|
||||||
this.select = __bind(this.select, this);
|
this.select = __bind(this.select, this);
|
||||||
|
|
||||||
this.click = __bind(this.click, this);
|
this.click = __bind(this.click, this);
|
||||||
|
|
||||||
var row;
|
var row;
|
||||||
if (!(this instanceof Morris.Donut)) {
|
if (!(this instanceof Morris.Donut)) {
|
||||||
return new Morris.Donut(options);
|
return new Morris.Donut(options);
|
||||||
|
@ -1754,7 +1741,6 @@
|
||||||
})(Morris.EventEmitter);
|
})(Morris.EventEmitter);
|
||||||
|
|
||||||
Morris.DonutSegment = (function(_super) {
|
Morris.DonutSegment = (function(_super) {
|
||||||
|
|
||||||
__extends(DonutSegment, _super);
|
__extends(DonutSegment, _super);
|
||||||
|
|
||||||
function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) {
|
function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) {
|
||||||
|
@ -1767,9 +1753,7 @@
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.raphael = raphael;
|
this.raphael = raphael;
|
||||||
this.deselect = __bind(this.deselect, this);
|
this.deselect = __bind(this.deselect, this);
|
||||||
|
|
||||||
this.select = __bind(this.select, this);
|
this.select = __bind(this.select, this);
|
||||||
|
|
||||||
this.sin_p0 = Math.sin(p0);
|
this.sin_p0 = Math.sin(p0);
|
||||||
this.cos_p0 = Math.cos(p0);
|
this.cos_p0 = Math.cos(p0);
|
||||||
this.sin_p1 = Math.sin(p1);
|
this.sin_p1 = Math.sin(p1);
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue