Skip to content
Snippets Groups Projects
Commit 37af1229 authored by Florian Raab's avatar Florian Raab
Browse files

LinePlot: change country name handling

parent 29f1bfb2
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,8 @@ import TypedSvg.Core exposing (Svg)
import Config.LinePlotConfig as Local exposing (Model)
import Html.Attributes exposing (wrap)
import Utils exposing (codeToName)
init : Model
init = { pointAnnotation = Nothing , vLineAnnotation = Nothing }
......@@ -60,7 +62,7 @@ view global model =
-- Default selected country
country_default : String
country_default =
Maybe.withDefault "Austria" global.selectedCountry
Maybe.withDefault "AT" global.selectedCountry
-- Get a list of all countries from global.data
countries : List String
......@@ -80,7 +82,7 @@ view global model =
in
option
[ Html.Attributes.value country, Html.Attributes.selected selected ]
[ Html.text country ]
[ Html.text (codeToName country) ]
-- Filter global.data based on the selected visa type and country
......@@ -280,8 +282,10 @@ view global model =
|> Line.withYAxis yAxis
|> Line.withXAxisCont xAxis
|> Line.render ( data, accessor )
in
Html.div [ Html.Attributes.style "position" "relative" ]
Html.div [ Html.Attributes.style "position" "relative"
]
[ Html.map propagate linit
, tooltip
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment