mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 21:27:52 +00:00
[CLA Approved] Fix references to telemetry data "unit" in the plot LEGEND form, top legend display and documentation (#5546)
* [Plot] Rename the `units` attribute to `unit` (#5540) Rename the `units` attribute to `unit` when referencing the telemetry data "unit" within: - the legend-form vue for setting the `valueToShowWhenCollapsed` and `showUnitsWhenExpanded` and displaying the available choices in write mode, - the plot-options-browse vue for displaying the selected choices within the form in read mode, - the plot-legend-item-collapsed when checking which field to display. * [Documentation] Update API documentation (#3562)
This commit is contained in:
parent
07bdbe5108
commit
d73cb2ef70
4
API.md
4
API.md
@ -390,7 +390,7 @@ A telemetry object is a domain object with a telemetry property. To take an exa
|
||||
{
|
||||
"key": "value",
|
||||
"name": "Value",
|
||||
"units": "kilograms",
|
||||
"unit": "kilograms",
|
||||
"format": "float",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
@ -425,7 +425,7 @@ attribute | type | flags | notes
|
||||
`name` | string | optional | a human readable label for this field. If omitted, defaults to `key`.
|
||||
`source` | string | optional | identifies the property of a datum where this value is stored. If omitted, defaults to `key`.
|
||||
`format` | string | optional | a specific format identifier, mapping to a formatter. If omitted, uses a default formatter. For enumerations, use `enum`. For timestamps, use `utc` if you are using utc dates, otherwise use a key mapping to your custom date format.
|
||||
`units` | string | optional | the units of this value, e.g. `km`, `seconds`, `parsecs`
|
||||
`unit` | string | optional | the unit of this value, e.g. `km`, `seconds`, `parsecs`
|
||||
`min` | number | optional | the minimum possible value of this measurement. Will be used by plots, gauges, etc to automatically set a min value.
|
||||
`max` | number | optional | the maximum possible value of this measurement. Will be used by plots, gauges, etc to automatically set a max value.
|
||||
`enumerations` | array | optional | for objects where `format` is `"enum"`, this array tracks all possible enumerations of the value. Each entry in this array is an object, with a `value` property that is the numerical value of the enumeration, and a `string` property that is the text value of the enumeration. ex: `{"value": 0, "string": "OFF"}`. If you use an enumerations array, `min` and `max` will be set automatically for you.
|
||||
|
@ -136,7 +136,7 @@
|
||||
<span v-if="showValueWhenExpanded">Value</span>
|
||||
<span v-if="showMinimumWhenExpanded">Min</span>
|
||||
<span v-if="showMaximumWhenExpanded">Max</span>
|
||||
<span v-if="showUnitsWhenExpanded">Units</span>
|
||||
<span v-if="showUnitsWhenExpanded">Unit</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -54,7 +54,7 @@
|
||||
<option value="nearestValue">Nearest value</option>
|
||||
<option value="min">Minimum value</option>
|
||||
<option value="max">Maximum value</option>
|
||||
<option value="units">Units</option>
|
||||
<option value="unit">Unit</option>
|
||||
</select>
|
||||
</div>
|
||||
</li>
|
||||
@ -89,7 +89,7 @@
|
||||
v-model="showUnitsWhenExpanded"
|
||||
type="checkbox"
|
||||
@change="updateForm('showUnitsWhenExpanded')"
|
||||
> Units</li>
|
||||
> Unit</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -41,7 +41,7 @@
|
||||
<span class="plot-series-name">{{ nameWithUnit }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-show="!!highlights.length && (valueToShowWhenCollapsed !== 'none' && valueToShowWhenCollapsed !== 'units')"
|
||||
v-show="!!highlights.length && (valueToShowWhenCollapsed !== 'none' && valueToShowWhenCollapsed !== 'unit')"
|
||||
class="plot-series-value hover-value-enabled"
|
||||
:class="[{ 'cursor-hover': notNearest }, valueToDisplayWhenCollapsedClass, mctLimitStateClass]"
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user