fix bugs caused by shouldUseMinMax reported by VISTA (#2555)

This commit is contained in:
Deep Tailor 2019-12-05 18:07:30 -08:00 committed by Andrew Henry
parent b3bc618bb0
commit 28d2194d51
2 changed files with 5 additions and 4 deletions

View File

@ -140,7 +140,8 @@ define([
* @returns {Promise}
*/
fetch: function (options) {
const strategy = options.shouldUseMinMax ? 'minMax' : undefined;
const strategy = options && options.shouldNotUseMinMax ? undefined : 'minMax';
options = _.extend({}, { size: 1000, strategy, filters: this.filters }, options || {});
if (!this.unsubscribe) {
this.unsubscribe = this.openmct

View File

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