[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:
Jamie V
2020-07-31 13:13:58 -07:00
committed by GitHub
parent a09da30768
commit f03bfdebb4
17 changed files with 242 additions and 12 deletions

View File

@ -58,6 +58,12 @@
>
<div class="c-telemetry-view__value-text">
{{ telemetryValue }}
<span
v-if="unit && item.showUnits"
class="c-telemetry-view__value-text__unit"
>
{{ unit }}
</span>
</div>
</div>
</div>
@ -137,6 +143,12 @@ export default {
return displayMode === 'all' || displayMode === 'value';
},
unit() {
let value = this.item.value,
unit = this.metadata.value(value).unit;
return unit;
},
styleObject() {
return Object.assign({}, {
fontSize: this.item.size
@ -257,7 +269,9 @@ export default {
item: domainObject,
layoutItem: this.item,
index: this.index,
updateTelemetryFormat: this.updateTelemetryFormat
updateTelemetryFormat: this.updateTelemetryFormat,
toggleUnits: this.toggleUnits,
showUnits: this.showUnits
};
this.removeSelectable = this.openmct.selection.selectable(
this.$el, this.context, this.immediatelySelect || this.initSelect);