Skip to content

Commit a7a53ab

Browse files
Small fixes
1 parent af1a0bd commit a7a53ab

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

webapp/TargetedMS/js/LeveyJenningsPlotHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Ext4.define("LABKEY.targetedms.LeveyJenningsPlotHelper", {
9393
},
9494

9595
getLJPlotTypeProperties: function(precursorInfo, metricProps) {
96-
var plotProperties = {};
96+
const plotProperties = {};
9797
// some properties are specific to whether we are showing multiple y-axis series
9898
if (this.isMultiSeries()) {
9999
plotProperties['value'] = 'value_' + this.metric;

webapp/TargetedMS/js/QCTrendPlotPanel.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,11 +830,16 @@ Ext4.define('LABKEY.targetedms.QCTrendPlotPanel', {
830830

831831
assignDefaultMetricIfNull: function () {
832832
if (this.metric == null || isNaN(Number(this.metric)) || !this.getMetricPropsById(this.metric)) {
833+
this.metric = null;
833834
for (let i = 0; i < this.metricPropArr.length; i++) {
834835
if (this.metricPropArr[i].name === 'Retention Time') {
835836
this.metric = this.metricPropArr[i].id;
836837
}
837838
}
839+
// Fall back on the first one
840+
if (!this.metric && this.metricPropArr.length > 0) {
841+
this.metric = this.metricPropArr[0].id;
842+
}
838843
}
839844
if (this.metric2 && !this.getMetricPropsById(this.metric2)) {
840845
this.metric2 = null;

webapp/TargetedMS/js/TrailingMeanPlotHelper.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ Ext4.define("LABKEY.targetedms.TrailingMeanPlotHelper", {
4545
plotProperties['TrailingMean'] = 'TrailingMean';
4646
}
4747

48-
// let min = Math.min(...precursorInfo.data.map(function(object) {
49-
// return object.TrailingMean;
50-
// }));
51-
// let max = Math.max(...precursorInfo.data.map(function(object) {
52-
// return object.TrailingMean;
53-
// }));
54-
//
55-
// plotProperties['yAxisDomain'] = [0, 10];//precursorInfo.minTrailingMean, precursorInfo.maxTrailingMean];
48+
let min = Math.min(...precursorInfo.data.map(function(object) {
49+
return object.TrailingMean;
50+
}));
51+
let max = Math.max(...precursorInfo.data.map(function(object) {
52+
return object.TrailingMean;
53+
}));
54+
55+
plotProperties['yAxisDomain'] = [min, max];
5656

5757
return plotProperties;
5858
},

0 commit comments

Comments
 (0)