Skip to content

Commit

Permalink
Do what the compiler says
Browse files Browse the repository at this point in the history
  • Loading branch information
terezka committed Oct 27, 2018
1 parent dc1ad77 commit a92d43d
Show file tree
Hide file tree
Showing 47 changed files with 461 additions and 520 deletions.
1 change: 1 addition & 0 deletions elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"dependencies": {
"avh4/elm-color": "1.0.0 <= v < 2.0.0",
"debois/elm-dom": "1.3.0 <= v < 2.0.0",
"elm/browser": "1.0.1 <= v < 2.0.0",
"elm/core": "1.0.0 <= v < 2.0.0",
"elm/html": "1.0.0 <= v < 2.0.0",
"elm/json": "1.0.0 <= v < 2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Dots/Example3.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Dots/Example4.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Dots/Example5.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Dots/Example6.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Events/Example1.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Events/Example2.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Events/Example3.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Events/Example4.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Junk/Example1.elm
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Junk/Example2.elm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Junk/Example4.elm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Line/Example2.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Line/Example3.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import Color.Manipulate as Manipulate

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Line/Example4.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import Color.Manipulate as Manipulate

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Docs/Ticks/Example2.elm
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
8 changes: 4 additions & 4 deletions examples/Events1.elm
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import LineChart.Grid as Grid
import LineChart.Legends as Legends
import LineChart.Area as Area
import Color
import Color.Manipulate
import Browser



main : Program Never Model Msg
main : Program () Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
7 changes: 4 additions & 3 deletions examples/Events2.elm
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ import LineChart.Grid as Grid
import LineChart.Legends as Legends
import LineChart.Area as Area
import Color
import Browser



main : Program Never Model Msg
main : Program () Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
9 changes: 5 additions & 4 deletions examples/Events3.elm
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ import LineChart.Grid as Grid
import LineChart.Legends as Legends
import LineChart.Area as Area
import Color
import Browser



main : Program Never Model Msg
main : Program () Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down Expand Up @@ -61,7 +62,7 @@ update msg model =
-- VIEW


view : Model -> Svg Msg
view : Model -> Html Msg
view model =
Html.div
[ class "container" ]
Expand Down
4 changes: 2 additions & 2 deletions examples/Selection1.elm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import LineChart.Axis.Intersection as Intersection

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Tooltip1.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import Color

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Tooltip2.elm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import Color

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
4 changes: 2 additions & 2 deletions examples/Tooltip3.elm
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import LineChart.Area as Area

main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
Expand Down
18 changes: 9 additions & 9 deletions src/Internal/Area.elm
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,26 @@ opacity : Config -> Float
opacity config =
case config of
None -> 0
Normal opacity -> opacity
Stacked opacity -> opacity
Percentage opacity -> opacity
Normal opacity_ -> opacity_
Stacked opacity_ -> opacity_
Percentage opacity_ -> opacity_


{-| -}
opacitySingle : Config -> Float
opacitySingle config =
case config of
None -> 0
Normal opacity -> opacity
Stacked opacity -> 1
Percentage opacity -> 1
Normal opacity_ -> opacity_
Stacked opacity_ -> 1
Percentage opacity_ -> 1


{-| -}
opacityContainer : Config -> Float
opacityContainer config =
case config of
None -> 1
Normal opacity -> 1
Stacked opacity -> opacity
Percentage opacity -> opacity
Normal opacity_ -> 1
Stacked opacity_ -> opacity_
Percentage opacity_ -> opacity_
Loading

0 comments on commit a92d43d

Please sign in to comment.