Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
graph sprucing.
Browse files Browse the repository at this point in the history
  • Loading branch information
benanhalt committed Nov 20, 2018
1 parent cb267b8 commit 728b3c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions source/McpaGraphView.elm
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ barGraph ( observedValue, pValue ) =
[]


drawVariable : Bool -> (( Float, Float ) -> String) -> String -> ( Maybe Float, Maybe Float, Maybe Float ) -> Html.Html msg
drawVariable showBarGraph formatter var ( observed, pValue, significant ) =
drawVariable : Bool -> (( Float, Float ) -> String) -> Int -> String -> ( Maybe Float, Maybe Float, Maybe Float ) -> Html.Html msg
drawVariable showBarGraph formatter i var ( observed, pValue, significant ) =
let
fontWeight =
if significant |> Maybe.map ((<) 0.5) |> Maybe.withDefault False then
Expand All @@ -81,7 +81,7 @@ drawVariable showBarGraph formatter var ( observed, pValue, significant ) =
|> Maybe.withDefault ""
in
Html.td
[ Html.Attributes.style [ ( "position", "relative" ), fontWeight ]
[ Html.Attributes.style [ ( "position", "relative" ), fontWeight, ( "border-bottom", "2px solid" ) ]
, Html.Attributes.title (var ++ "\n" ++ values)
]
bar
Expand All @@ -108,7 +108,7 @@ viewGraph selectedNode showBarGraph variableFormatter vars dataForVar =
case selectedNode of
Just _ ->
( envVars
|> List.map (\var -> dataForVar var |> drawVariable showBarGraph variableFormatter var)
|> List.indexedMap (\i var -> dataForVar var |> drawVariable showBarGraph variableFormatter i var)
|> Html.tr
[ Html.Attributes.style
[ ( "height", "400px" )
Expand All @@ -117,8 +117,8 @@ viewGraph selectedNode showBarGraph variableFormatter vars dataForVar =
]
]
, bgVars
|> List.indexedMap (\i var -> dataForVar var |> drawVariable showBarGraph variableFormatter i var)
|> List.reverse
|> List.map (\var -> dataForVar var |> drawVariable showBarGraph variableFormatter var)
|> Html.tr
[ Html.Attributes.style
[ ( "height", "400px" )
Expand Down Expand Up @@ -185,6 +185,7 @@ viewGraph selectedNode showBarGraph variableFormatter vars dataForVar =
|> toString
|> flip (++) "%"
)
, ( "border-right", "1px solid" )
]
]
[ envVarTableRows
Expand All @@ -202,6 +203,7 @@ viewGraph selectedNode showBarGraph variableFormatter vars dataForVar =
|> toString
|> flip (++) "%"
)
, ( "border-left", "1px solid" )
]
]
[ bgVarTableRows
Expand Down
2 changes: 1 addition & 1 deletion source/McpaView.elm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ view model =
[ ( "display", "flex" )
-- , ( "justify-content", "space-between" )
, ( "font-family", "sans-serif" )
, ( "height", "100vh" )
, ( "height", "1080px" )
]
]
[ viewTree model True selectData
Expand Down

0 comments on commit 728b3c5

Please sign in to comment.