parent
17aec6de95
commit
67030024d4
2
docs/assets/js/frappe-charts.min.js
vendored
2
docs/assets/js/frappe-charts.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
119
docs/assets/js/index.min.js
vendored
119
docs/assets/js/index.min.js
vendored
@ -19,6 +19,119 @@ var HEATMAP_COLORS_YELLOW = ['#ebedf0', '#fdf436', '#ffc700', '#ff9100', '#06001
|
|||||||
|
|
||||||
// Universal constants
|
// Universal constants
|
||||||
|
|
||||||
|
var asyncGenerator = function () {
|
||||||
|
function AwaitValue(value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function AsyncGenerator(gen) {
|
||||||
|
var front, back;
|
||||||
|
|
||||||
|
function send(key, arg) {
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
var request = {
|
||||||
|
key: key,
|
||||||
|
arg: arg,
|
||||||
|
resolve: resolve,
|
||||||
|
reject: reject,
|
||||||
|
next: null
|
||||||
|
};
|
||||||
|
|
||||||
|
if (back) {
|
||||||
|
back = back.next = request;
|
||||||
|
} else {
|
||||||
|
front = back = request;
|
||||||
|
resume(key, arg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function resume(key, arg) {
|
||||||
|
try {
|
||||||
|
var result = gen[key](arg);
|
||||||
|
var value = result.value;
|
||||||
|
|
||||||
|
if (value instanceof AwaitValue) {
|
||||||
|
Promise.resolve(value.value).then(function (arg) {
|
||||||
|
resume("next", arg);
|
||||||
|
}, function (arg) {
|
||||||
|
resume("throw", arg);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
settle(result.done ? "return" : "normal", result.value);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
settle("throw", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function settle(type, value) {
|
||||||
|
switch (type) {
|
||||||
|
case "return":
|
||||||
|
front.resolve({
|
||||||
|
value: value,
|
||||||
|
done: true
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "throw":
|
||||||
|
front.reject(value);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
front.resolve({
|
||||||
|
value: value,
|
||||||
|
done: false
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
front = front.next;
|
||||||
|
|
||||||
|
if (front) {
|
||||||
|
resume(front.key, front.arg);
|
||||||
|
} else {
|
||||||
|
back = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this._invoke = send;
|
||||||
|
|
||||||
|
if (typeof gen.return !== "function") {
|
||||||
|
this.return = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof Symbol === "function" && Symbol.asyncIterator) {
|
||||||
|
AsyncGenerator.prototype[Symbol.asyncIterator] = function () {
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
AsyncGenerator.prototype.next = function (arg) {
|
||||||
|
return this._invoke("next", arg);
|
||||||
|
};
|
||||||
|
|
||||||
|
AsyncGenerator.prototype.throw = function (arg) {
|
||||||
|
return this._invoke("throw", arg);
|
||||||
|
};
|
||||||
|
|
||||||
|
AsyncGenerator.prototype.return = function (arg) {
|
||||||
|
return this._invoke("return", arg);
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
wrap: function (fn) {
|
||||||
|
return function () {
|
||||||
|
return new AsyncGenerator(fn.apply(this, arguments));
|
||||||
|
};
|
||||||
|
},
|
||||||
|
await: function (value) {
|
||||||
|
return new AwaitValue(value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the value of a number upto 2 decimal places.
|
* Returns the value of a number upto 2 decimal places.
|
||||||
* @param {Number} d Any number
|
* @param {Number} d Any number
|
||||||
@ -93,6 +206,12 @@ function getRandomBias(min, max, bias, influence) {
|
|||||||
* @param {Number} d Any Number
|
* @param {Number} d Any Number
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a deep clone of an object
|
||||||
|
* @param {Object} candidate Any Object
|
||||||
|
*/
|
||||||
|
|
||||||
// Playing around with dates
|
// Playing around with dates
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -31,11 +31,9 @@ export function dataPrep(data, type) {
|
|||||||
} else {
|
} else {
|
||||||
vals = fillArray(vals, datasetLength - vals.length, 0);
|
vals = fillArray(vals, datasetLength - vals.length, 0);
|
||||||
}
|
}
|
||||||
|
d.values = vals;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set labels
|
|
||||||
//
|
|
||||||
|
|
||||||
// Set type
|
// Set type
|
||||||
if(!d.chartType ) {
|
if(!d.chartType ) {
|
||||||
if(!AXIS_DATASET_CHART_TYPES.includes(type)) type === DEFAULT_AXIS_CHART_TYPE;
|
if(!AXIS_DATASET_CHART_TYPES.includes(type)) type === DEFAULT_AXIS_CHART_TYPE;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user