mirror of
https://github.com/morrisjs/morris.js.git
synced 2026-01-08 22:18:03 -05:00
Recompile.
This commit is contained in:
@@ -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.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 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}
|
||||
|
||||
30
morris.js
30
morris.js
@@ -11,7 +11,6 @@
|
||||
$ = jQuery;
|
||||
|
||||
Morris.EventEmitter = (function() {
|
||||
|
||||
function EventEmitter() {}
|
||||
|
||||
EventEmitter.prototype.on = function(name, handler) {
|
||||
@@ -65,7 +64,6 @@
|
||||
};
|
||||
|
||||
Morris.Grid = (function(_super) {
|
||||
|
||||
__extends(Grid, _super);
|
||||
|
||||
function Grid(options) {
|
||||
@@ -75,7 +73,7 @@
|
||||
} else {
|
||||
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");
|
||||
}
|
||||
if (this.el.css('position') === 'static') {
|
||||
@@ -187,7 +185,7 @@
|
||||
redraw = true;
|
||||
}
|
||||
this.options.data = data;
|
||||
if (!(data != null) || data.length === 0) {
|
||||
if ((data == null) || data.length === 0) {
|
||||
this.data = [];
|
||||
this.raphael.clear();
|
||||
if (this.hover != null) {
|
||||
@@ -305,7 +303,7 @@
|
||||
this.grid = (function() {
|
||||
var _i, _ref1, _ref2, _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);
|
||||
}
|
||||
return _results;
|
||||
@@ -365,7 +363,7 @@
|
||||
grid = (function() {
|
||||
var _i, _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)));
|
||||
}
|
||||
return _results;
|
||||
@@ -374,7 +372,7 @@
|
||||
grid = (function() {
|
||||
var _i, _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);
|
||||
}
|
||||
return _results;
|
||||
@@ -621,7 +619,6 @@
|
||||
};
|
||||
|
||||
Morris.Hover = (function() {
|
||||
|
||||
Hover.defaults = {
|
||||
"class": 'morris-hover morris-default-style'
|
||||
};
|
||||
@@ -683,16 +680,12 @@
|
||||
})();
|
||||
|
||||
Morris.Line = (function(_super) {
|
||||
|
||||
__extends(Line, _super);
|
||||
|
||||
function Line(options) {
|
||||
this.hilight = __bind(this.hilight, this);
|
||||
|
||||
this.onHoverOut = __bind(this.onHoverOut, this);
|
||||
|
||||
this.onHoverMove = __bind(this.onHoverMove, this);
|
||||
|
||||
this.onGridClick = __bind(this.onGridClick, this);
|
||||
if (!(this instanceof Morris.Line)) {
|
||||
return new Morris.Line(options);
|
||||
@@ -901,7 +894,7 @@
|
||||
label.transform("t" + offset + ",0...");
|
||||
}
|
||||
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) {
|
||||
margin = 1.25 * _this.options.gridTextSize / Math.sin(_this.options.xLabelAngle * Math.PI / 180.0);
|
||||
prevAngleMargin = labelBox.x - margin;
|
||||
@@ -1365,14 +1358,11 @@
|
||||
})(Morris.Line);
|
||||
|
||||
Morris.Bar = (function(_super) {
|
||||
|
||||
__extends(Bar, _super);
|
||||
|
||||
function Bar(options) {
|
||||
this.onHoverOut = __bind(this.onHoverOut, this);
|
||||
|
||||
this.onHoverMove = __bind(this.onHoverMove, this);
|
||||
|
||||
this.onGridClick = __bind(this.onGridClick, this);
|
||||
if (!(this instanceof Morris.Bar)) {
|
||||
return new Morris.Bar(options);
|
||||
@@ -1459,7 +1449,7 @@
|
||||
offset = -0.5 * textBox.width * Math.cos(this.options.xLabelAngle * Math.PI / 180.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) {
|
||||
margin = 1.25 * this.options.gridTextSize / Math.sin(this.options.xLabelAngle * Math.PI / 180.0);
|
||||
prevAngleMargin = labelBox.x - margin;
|
||||
@@ -1596,7 +1586,6 @@
|
||||
})(Morris.Grid);
|
||||
|
||||
Morris.Donut = (function(_super) {
|
||||
|
||||
__extends(Donut, _super);
|
||||
|
||||
Donut.prototype.defaults = {
|
||||
@@ -1608,9 +1597,7 @@
|
||||
|
||||
function Donut(options) {
|
||||
this.select = __bind(this.select, this);
|
||||
|
||||
this.click = __bind(this.click, this);
|
||||
|
||||
var row;
|
||||
if (!(this instanceof Morris.Donut)) {
|
||||
return new Morris.Donut(options);
|
||||
@@ -1754,7 +1741,6 @@
|
||||
})(Morris.EventEmitter);
|
||||
|
||||
Morris.DonutSegment = (function(_super) {
|
||||
|
||||
__extends(DonutSegment, _super);
|
||||
|
||||
function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) {
|
||||
@@ -1767,9 +1753,7 @@
|
||||
this.index = index;
|
||||
this.raphael = raphael;
|
||||
this.deselect = __bind(this.deselect, this);
|
||||
|
||||
this.select = __bind(this.select, this);
|
||||
|
||||
this.sin_p0 = Math.sin(p0);
|
||||
this.cos_p0 = Math.cos(p0);
|
||||
this.sin_p1 = Math.sin(p1);
|
||||
|
||||
3
morris.min.js
vendored
3
morris.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user