nasa / openmct

A web based mission control framework.
https://nasa.github.io/openmct/
Other
12k stars 1.24k forks source link

Support Bar Graphs in Open MCT #4177

Closed shefalijoshi closed 2 years ago

shefalijoshi commented 3 years ago

Is your feature request related to a problem? Please describe. Bar Graphs should display bars with range variable names on the X-axis and values on the Y-axis.

Describe the solution you'd like Bar Graphs should accept aggregate telemetry. Metadata should be provided that determines which attributes of the telemetry to use for which axisThis will come later as there is yamcs work to do and nobody to do it right now.

Additional context Add any other context or screenshots about the feature request here. See the following issues that make up this feature: Resolves #4100 Resolves #4101 Resolves #4178 Resolves #4102 Resolves #4191 Resolves #4192 Resolves #4212 Resolves #4217

shefalijoshi commented 3 years ago

Testing instructions:

jvigliotta commented 3 years ago

Looks awesome, nice work!

Couple issues I found:

nikhilmandlik commented 3 years ago
  1. Missing horizontal axis line (marker line) for value '0' Screen Shot 2021-09-20 at 3 56 36 PM
kobe1104 commented 3 years ago

Testathon 9/20/2021.

charlesh88 commented 3 years ago

Testathon 9-20-21: some problems identified

  1. Plot series in Inspector needs proper placement and formatting.
  2. 0 value hash line missing, @charlesh88 to look into.
  3. Y axis is not displaying values properly. Filed new issue for Y axis labels: https://github.com/nasa/openmct/issues/4237

Should we reopen this for needed fixes?

charlesh88 commented 3 years ago
  1. Missing horizontal axis line (marker line) for value '0'

Think this is @charlesh88's fault, will look into.

charlesh88 commented 2 years ago

Testathon 9-28-21: Plot series in Inspector formatting still not addressed:

Bar Graph

Screen Shot 2021-09-28 at 4 34 44 PM

Should look like Overlay Plot

Screen Shot 2021-09-28 at 3 32 35 PM

The series element needs to show the object type icon (line 30 in BarGraphOptions.vue) @shefalijoshi could you add please? For reference, see markup in SeriesForm.vue lines 11 - 20.

charlesh88 commented 2 years ago

Just pushed a fix for the hidden 0 line issue to https://github.com/nasa/openmct/pull/4270

shefalijoshi commented 2 years ago

@scottbell Please take a look at https://github.com/nasa/openmct/issues/4177#issuecomment-929699862

scottbell commented 2 years ago

Ok, I think I've got the bar graph inspector squared away now:

image

https://github.com/nasa/openmct/pull/4275

nikhilmandlik commented 2 years ago

Observed some issues as follows,

Screen Shot 2021-10-08 at 10 25 32 AM
jvigliotta commented 2 years ago

Partially Verified:

Issues:

scottbell commented 2 years ago

@nikhilmandlik @jvigliotta I'm having some problems replicating the issue in 1.7.8. Here's an animation of dropping an SWG onto a bar graph Oct-12-2021 14-24-33 There may be another way of adding telemetry to a bar graph that I'm missing, or maybe the shape of the telemetry object is different, or I may be testing the wrong version?

Thanks for the help!

shefalijoshi commented 2 years ago

@scottbell The issue is if the identifier of the domainObject resembles something like this: someNamespace:~OpenMCT~outer.inner.someEndpoint. Notice the . dots in the key outer.inner.someEndpoint

When the bar styles are being saved to the domain object via objects.mutate() here: https://github.com/nasa/openmct/blob/1.7.8/src/plugins/charts/BarGraphView.vue#L105 the style is being saved as an object hierarchy rather than a string: this.domainObject....series['someNamespace:~OpenMCT~outer.inner.someEndpoint']: 'someNamespace:~OpenMCT~outer': { inner: { someEndpoint: { color: '#ffffff', name: 'someEndpoint' } } }

Interestingly, there is also the following (but with an empty name): this.domainObject....series['someNamespace:~OpenMCT~outer.inner.someEndpoint']: 'someNamespace:~OpenMCT~outer.inner.someEndpoint': { color: '#000fff', name: "" }

I suspect we need to convert the ${this.key} to a string when we call mutate

shefalijoshi commented 2 years ago

@scottbell for @nikhilmandlik 's issue, I see the following console error: image So it is almost certainly an old bar graph. I think we can skip this issue and have him retest with a NEW bar graph.

unlikelyzero commented 2 years ago

Verified fixed