Column Labels #313
-
The user interface needs good column labels for all of our tables. For example, if a user is entering a stage-discharge function with uncertainty where the distributional assumption is triangular, then we want four columns: discharge, minimum stage, most likely stage, and maximum stage. What are the different ways to make this happen? |
Beta Was this translation helpful? Give feedback.
Answered by
Brennan1994
Apr 14, 2022
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
rnugent3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The way I'd propose to handle this is as I did in the Pilot UI.
I added a property to the ComputeComponentVM (which is a base level vm each of the relationships builds off of) which holds a string in the format shown above (xunit, yunit). I set that property on construction, and bind it to the view to display above the table with plot. This lets our tables stay as generic and reusable as possible, and keeps the changing of units out of more complicated data table code.
Currently, column headers are set by attribute on the row classes, like in the triangularRow class here:
We could make this a dynamic title instead, and pass down information to it from it's creator so that attribute coul…