mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 06:38:17 +00:00
Plot y axis label fix (#2437)
* set yAxis label if none is set yet * remove empty listener
This commit is contained in:
committed by
Pegah Sarram
parent
e6a7b4ed6c
commit
3b094e43e3
@ -124,7 +124,7 @@
|
|||||||
ng-model="yAxisLabel" ng-change="plot.toggleYAxisLabel(yAxisLabel, yKeyOptions, series[0])">
|
ng-model="yAxisLabel" ng-change="plot.toggleYAxisLabel(yAxisLabel, yKeyOptions, series[0])">
|
||||||
<option ng-repeat="option in yKeyOptions"
|
<option ng-repeat="option in yKeyOptions"
|
||||||
value="{{option.name}}"
|
value="{{option.name}}"
|
||||||
ng-selected="option.name == yAxisLabel">
|
ng-selected="option.name === yAxisLabel">
|
||||||
{{option.name}}
|
{{option.name}}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
@ -177,7 +177,7 @@
|
|||||||
<div class="gl-plot__local-controls h-local-controls h-local-controls--overlay-content c-local-controls--show-on-hover">
|
<div class="gl-plot__local-controls h-local-controls h-local-controls--overlay-content c-local-controls--show-on-hover">
|
||||||
<div class="c-button-set c-button-set--strip-h">
|
<div class="c-button-set c-button-set--strip-h">
|
||||||
<button class="c-button icon-minus"
|
<button class="c-button icon-minus"
|
||||||
ng-click="plot.toggleYAxis()"
|
ng-click="plot.zoom('out', 0.2)"
|
||||||
title="Zoom out">
|
title="Zoom out">
|
||||||
</button>
|
</button>
|
||||||
<button class="c-button icon-plus"
|
<button class="c-button icon-plus"
|
||||||
|
@ -123,6 +123,14 @@ define([
|
|||||||
key: o.key
|
key: o.key
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// set yAxisLabel if none is set yet
|
||||||
|
if (this.$scope.yAxisLabel === 'none') {
|
||||||
|
let yKey = this.$scope.series[0].model.yKey,
|
||||||
|
yKeyModel = this.$scope.yKeyOptions.filter(o => o.key === yKey)[0];
|
||||||
|
|
||||||
|
this.$scope.yAxisLabel = yKeyModel.name;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$scope.yKeyOptions = undefined;
|
this.$scope.yKeyOptions = undefined;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user