mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 21:53:08 +00:00
[Tutorials] Add remainder of bargraph
This commit is contained in:
parent
a6ef1d3423
commit
c70793ac2d
@ -5,7 +5,7 @@ define([
|
|||||||
legacyRegistry,
|
legacyRegistry,
|
||||||
BarGraphController
|
BarGraphController
|
||||||
) {
|
) {
|
||||||
legacyRegistry.register("tutorials/todo", {
|
legacyRegistry.register("tutorials/bargraph", {
|
||||||
"name": "Bar Graph",
|
"name": "Bar Graph",
|
||||||
"description": "Provides the Bar Graph view of telemetry elements.",
|
"description": "Provides the Bar Graph view of telemetry elements.",
|
||||||
"extensions": {
|
"extensions": {
|
||||||
@ -17,6 +17,7 @@ define([
|
|||||||
"templateUrl": "templates/bargraph.html",
|
"templateUrl": "templates/bargraph.html",
|
||||||
"needs": [ "telemetry" ],
|
"needs": [ "telemetry" ],
|
||||||
"delegation": true,
|
"delegation": true,
|
||||||
|
"editable": true,
|
||||||
"toolbar": {
|
"toolbar": {
|
||||||
"sections": [
|
"sections": [
|
||||||
{
|
{
|
||||||
|
35
tutorials/bargraph/res/templates/bargraph.html
Normal file
35
tutorials/bargraph/res/templates/bargraph.html
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<div class="example-bargraph" ng-controller="BarGraphController">
|
||||||
|
<div class="example-tick-labels">
|
||||||
|
<div ng-repeat="value in [low, middle, high] track by $index"
|
||||||
|
class="example-tick-label"
|
||||||
|
style="bottom: {{ toPercent(value) }}%">
|
||||||
|
{{value}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="example-graph-area">
|
||||||
|
<div ng-repeat="telemetryObject in telemetryObjects"
|
||||||
|
style="left: {{barWidth * $index}}%; width: {{barWidth}}%"
|
||||||
|
class="example-bar-holder">
|
||||||
|
<div class="example-bar"
|
||||||
|
ng-style="{
|
||||||
|
bottom: getBottom(telemetryObject) + '%',
|
||||||
|
top: getTop(telemetryObject) + '%'
|
||||||
|
}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="bottom: {{ toPercent(middle) }}%"
|
||||||
|
class="example-graph-tick">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="example-bar-labels">
|
||||||
|
<div ng-repeat="telemetryObject in telemetryObjects"
|
||||||
|
style="left: {{barWidth * $index}}%; width: {{barWidth}}%"
|
||||||
|
class="example-bar-holder example-label">
|
||||||
|
<mct-representation key="'label'"
|
||||||
|
mct-object="telemetryObject">
|
||||||
|
</mct-representation>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user