Compare commits

...

2 Commits

Author SHA1 Message Date
Deep Tailor
cee8b5ce1f port minmax filter fix to vista-4.3.0 2019-12-11 10:49:20 -08:00
Deep Tailor
8d45d86d7a fix bugs caused by shouldUseMinMax reported by VISTA 2019-12-03 15:41:11 -08:00
2 changed files with 8 additions and 20 deletions

View File

@@ -140,8 +140,14 @@ define([
* @returns {Promise}
*/
fetch: function (options) {
const strategy = options.shouldUseMinMax ? 'minMax' : undefined;
let strategy;
if (this.model.interpolate !== 'none') {
strategy = 'minMax';
}
options = _.extend({}, { size: 1000, strategy, filters: this.filters }, options || {});
if (!this.unsubscribe) {
this.unsubscribe = this.openmct
.telemetry
@@ -378,19 +384,6 @@ define([
delete this.unsubscribe;
}
this.fetch();
},
/**
* Clears the plot series, unsubscribes and resubscribes
* @public
*/
refresh: function () {
this.reset();
if (this.unsubscribe) {
this.unsubscribe();
delete this.unsubscribe;
}
this.fetch();
}
});

View File

@@ -102,8 +102,7 @@ define([
this.startLoading();
var options = {
size: this.$element[0].offsetWidth,
domain: this.config.xAxis.get('key'),
shouldUseMinMax: this.shouldUseMinMax(series)
domain: this.config.xAxis.get('key')
};
series.load(options)
@@ -161,10 +160,6 @@ define([
return config;
};
PlotController.prototype.shouldUseMinMax = function (series) {
return series.model.interpolate !== 'none';
};
PlotController.prototype.onTimeSystemChange = function (timeSystem) {
this.config.xAxis.set('key', timeSystem.key);
};