mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 16:36:13 +00:00
making plot series name with unit a dynamic function
This commit is contained in:
parent
3f2ad2be0c
commit
756e7e5372
@ -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('nameWithUnit') }}</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) }"
|
||||
|
@ -102,7 +102,6 @@ define([
|
||||
return {
|
||||
name: options.domainObject.name,
|
||||
unit: range.unit,
|
||||
nameWithUnit: options.domainObject.name + (range.unit ? ' ' + range.unit : ''),
|
||||
xKey: options.collection.plot.xAxis.get('key'),
|
||||
yKey: range.key,
|
||||
markers: true,
|
||||
@ -428,6 +427,10 @@ define([
|
||||
const markerSize = this.get('markerSize');
|
||||
|
||||
return `${markerShape}: ${markerSize}px`;
|
||||
},
|
||||
nameWithUnit: function () {
|
||||
let unit = this.get('unit');
|
||||
return this.get('name') + (unit ? ' ' + unit : '');
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user