mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 21:28:12 +00:00
[Telemetry Tables][Plots] Display units where applicable (#3198)
* added unit columns in telemetry tables * added unit column hiding in telemetry tables, added units to lad tables and sets * added units to plots and plot legends
This commit is contained in:
@ -49,7 +49,7 @@
|
||||
ng-style="{ 'background-color': series.get('color').asHexString() }">
|
||||
</span>
|
||||
<span class="is-missing__indicator" title="This item is missing"></span>
|
||||
<span class="plot-series-name">{{ series.get('name') }}</span>
|
||||
<span class="plot-series-name">{{ series.nameWithUnit() }}</span>
|
||||
</div>
|
||||
<div class="plot-series-value hover-value-enabled value-to-display-{{ legend.get('valueToShowWhenCollapsed') }} {{ series.closest.mctLimitState.cssClass }}"
|
||||
ng-class="{ 'cursor-hover': (legend.get('valueToShowWhenCollapsed').indexOf('nearest') != -1) }"
|
||||
@ -79,6 +79,9 @@
|
||||
<th ng-if="legend.get('showValueWhenExpanded')">
|
||||
Value
|
||||
</th>
|
||||
<th ng-if="legend.get('showUnitsWhenExpanded')">
|
||||
Unit
|
||||
</th>
|
||||
<th ng-if="legend.get('showMinimumWhenExpanded')"
|
||||
class="mobile-hide">
|
||||
Min
|
||||
@ -114,6 +117,11 @@
|
||||
{{ series.formatY(series.closest) }}
|
||||
</span>
|
||||
</td>
|
||||
<td ng-if="legend.get('showUnitsWhenExpanded')">
|
||||
<span class="plot-series-value cursor-hover hover-value-enabled">
|
||||
{{ series.get('unit') }}
|
||||
</span>
|
||||
</td>
|
||||
<td ng-if="legend.get('showMinimumWhenExpanded')"
|
||||
class="mobile-hide">
|
||||
<span class="plot-series-value">
|
||||
|
@ -140,6 +140,7 @@
|
||||
<span ng-if="config.legend.get('showValueWhenExpanded')">Value</span>
|
||||
<span ng-if="config.legend.get('showMinimumWhenExpanded')">Min</span>
|
||||
<span ng-if="config.legend.get('showMaximumWhenExpanded')">Max</span>
|
||||
<span ng-if="config.legend.get('showUnitsWhenExpanded')">Units</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -201,6 +201,7 @@
|
||||
<option value="nearestValue">Nearest value</option>
|
||||
<option value="min">Minimum value</option>
|
||||
<option value="max">Maximum value</option>
|
||||
<option value="units">showUnitsWhenExpanded</option>
|
||||
</select>
|
||||
</div>
|
||||
</li>
|
||||
@ -217,6 +218,8 @@
|
||||
ng-model="form.showMinimumWhenExpanded"/> Minimum value</li>
|
||||
<li><input type="checkbox"
|
||||
ng-model="form.showMaximumWhenExpanded"/> Maximum value</li>
|
||||
<li><input type="checkbox"
|
||||
ng-model="form.showUnitsWhenExpanded"/> Units</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -53,7 +53,8 @@ define([
|
||||
showTimestampWhenExpanded: true,
|
||||
showValueWhenExpanded: true,
|
||||
showMaximumWhenExpanded: true,
|
||||
showMinimumWhenExpanded: true
|
||||
showMinimumWhenExpanded: true,
|
||||
showUnitsWhenExpanded: true
|
||||
};
|
||||
}
|
||||
});
|
||||
|
@ -102,6 +102,7 @@ define([
|
||||
|
||||
return {
|
||||
name: options.domainObject.name,
|
||||
unit: range.unit,
|
||||
xKey: options.collection.plot.xAxis.get('key'),
|
||||
yKey: range.key,
|
||||
markers: true,
|
||||
@ -439,6 +440,11 @@ define([
|
||||
const markerSize = this.get('markerSize');
|
||||
|
||||
return `${markerShape}: ${markerSize}px`;
|
||||
},
|
||||
nameWithUnit: function () {
|
||||
let unit = this.get('unit');
|
||||
|
||||
return this.get('name') + (unit ? ' ' + unit : '');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -65,6 +65,11 @@ define([
|
||||
modelProp: 'showMinimumWhenExpanded',
|
||||
coerce: Boolean,
|
||||
objectPath: 'configuration.legend.showMinimumWhenExpanded'
|
||||
},
|
||||
{
|
||||
modelProp: 'showUnitsWhenExpanded',
|
||||
coerce: Boolean,
|
||||
objectPath: 'configuration.legend.showUnitsWhenExpanded'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
Reference in New Issue
Block a user