Move getBinsCount function to a class method
This commit is contained in:
parent
49a60caffc
commit
e84f30488f
@ -583,7 +583,7 @@ module.exports = class Histogram extends BaseWidget {
|
|||||||
override = override || {};
|
override = override || {};
|
||||||
var buckets = [];
|
var buckets = [];
|
||||||
|
|
||||||
var binsCount = getBinsCount(override);
|
var binsCount = this.getBinsCount(override);
|
||||||
var width = getWidth(override);
|
var width = getWidth(override);
|
||||||
var binsStart = this.getBinStart(override);
|
var binsStart = this.getBinStart(override);
|
||||||
var nulls = 0;
|
var nulls = 0;
|
||||||
@ -694,6 +694,9 @@ module.exports = class Histogram extends BaseWidget {
|
|||||||
return override.end || 0;
|
return override.end || 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getBinsCount (override) {
|
||||||
|
return override.bins || 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var DATE_AGGREGATIONS = {
|
var DATE_AGGREGATIONS = {
|
||||||
@ -707,10 +710,6 @@ var DATE_AGGREGATIONS = {
|
|||||||
'year': true
|
'year': true
|
||||||
};
|
};
|
||||||
|
|
||||||
function getBinsCount(override) {
|
|
||||||
return override.bins || 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getWidth(override) {
|
function getWidth(override) {
|
||||||
var width = 0;
|
var width = 0;
|
||||||
var binsCount = override.bins;
|
var binsCount = override.bins;
|
||||||
|
Loading…
Reference in New Issue
Block a user