[{"name":"Svg.Chart","comment":" This module contains higher-level SVG plotting elements.\n\n# Series\n\n## Dots\n@docs Dot, clear, empty, disconnected, aura, full\n@docs circle, triangle, square, diamond, plus, cross\n\n## Interpolation\n@docs scatter, linear, linearArea, monotone, monotoneArea\n\n# Bar charts\n@docs Bar, bar, bars, histogram\n\n# Straight lines\n@docs line, fullHorizontal, fullVertical, horizontal, vertical\n\n## Ticks\nProTip: Passing a negative value as the height/width of a tick renders it\nmirrored on the other side of the axis!\n\n@docs xTick, xTicks, yTick, yTicks\n\n## Labels\n\n@docs xLabel, xLabels, yLabel, yLabels\n\n\n","unions":[{"name":"Bar","comment":" ","args":["msg"],"cases":[]}],"aliases":[{"name":"Dot","comment":" ","args":["msg"],"type":"Svg.Coordinates.Plane -> Basics.Float -> Basics.Float -> Svg.Svg msg"}],"values":[{"name":"aura","comment":" Make a shape with a little translucent border.\n\n    someDot : Svg msg\n    someDot =\n      aura radius width opacity circle \"blue\" plane x y\n","type":"Basics.Float -> Basics.Int -> Basics.Float -> Svg.Chart.Shape -> String.String -> Svg.Chart.Dot msg"},{"name":"bar","comment":" ","type":"List.List (Svg.Attribute msg) -> Basics.Float -> Svg.Chart.Bar msg"},{"name":"bars","comment":" You can draw a bar chart like this:\n\n    main : Svg msg\n    main =\n      svg\n        [ width (String.fromFloat plane.x.length)\n        , height (String.fromFloat plane.y.length)\n        ]\n        [ bars plane 0.8\n            [ bar [ fill \"red\" ] << Tuple.first\n            , bar [ fill \"blue\" ] << Tuple.second\n            ]\n            [ ( 2, 3 ), ( 5, 1 ), ( 1, 5 ) ]\n        ]\n\nNote on `width`: The width takes catersian units, however, should you have\na width in SVG units, you can use `Svg.Coordinates.scaleCartesian` to\ntranslate it into cartesian units.\n","type":"Svg.Coordinates.Plane -> Basics.Float -> List.List (data -> Svg.Chart.Bar msg) -> List.List data -> Svg.Svg msg"},{"name":"circle","comment":" ","type":"Svg.Chart.Shape"},{"name":"clear","comment":" A dot without visual representation.\n","type":"Svg.Coordinates.Plane -> Basics.Float -> Basics.Float -> Svg.Svg msg"},{"name":"cross","comment":" ","type":"Svg.Chart.Shape"},{"name":"diamond","comment":" ","type":"Svg.Chart.Shape"},{"name":"disconnected","comment":" Make a shape with a white border.\n\n    someDot : Svg msg\n    someDot =\n      disconnected radius width circle \"blue\" plane x y\n","type":"Basics.Float -> Basics.Int -> Svg.Chart.Shape -> String.String -> Svg.Chart.Dot msg"},{"name":"empty","comment":" Make a shape with a white core.\n\n    someDot : Svg msg\n    someDot =\n      empty radius width circle \"blue\" plane x y\n","type":"Basics.Float -> Basics.Int -> Svg.Chart.Shape -> String.String -> Svg.Chart.Dot msg"},{"name":"full","comment":" Make a regular shape.\n\n    someDot : Svg msg\n    someDot =\n      full radius circle \"blue\" plane x y\n","type":"Basics.Float -> Svg.Chart.Shape -> String.String -> Svg.Chart.Dot msg"},{"name":"fullHorizontal","comment":" Renders a horizontal line with the full length of the range.\n\n    myXAxisOrGridLine : Svg msg\n    myXAxisOrGridLine =\n      fullHorizontal plane [] yPosition\n","type":"Svg.Coordinates.Plane -> List.List (Svg.Attribute msg) -> Basics.Float -> Svg.Svg msg"},{"name":"fullVertical","comment":" Renders a vertical line with the full length of the domain.\n\n    myYAxisOrGridLine : Svg msg\n    myYAxisOrGridLine =\n      fullVertical plane [] xPosition\n","type":"Svg.Coordinates.Plane -> List.List (Svg.Attribute msg) -> Basics.Float -> Svg.Svg msg"},{"name":"histogram","comment":" Make a histogram.\n\n    main : Svg msg\n    main =\n      svg\n        [ width (String.fromFloat plane.x.length)\n        , height (String.fromFloat plane.y.length)\n        ]\n        [ histogram plane 1 1 (bar [ stroke blueStroke, fill blueFill ]) [ 1, 2, 3, 6, 8, 9, 6, 4, 2, 1 ] ]\n","type":"Svg.Coordinates.Plane -> (data -> Basics.Float) -> Basics.Float -> (data -> Svg.Chart.Bar msg) -> List.List data -> Svg.Svg msg"},{"name":"horizontal","comment":" Renders a horizontal line.\n\n    myLine : Svg msg\n    myLine =\n      horizontal plane [ stroke \"pink\" ] y x0 x1\n\n","type":"Svg.Coordinates.Plane -> List.List (Svg.Attribute msg) -> Basics.Float -> Basics.Float -> Basics.Float -> Svg.Svg msg"},{"name":"line","comment":" Renders a line.\n\n    myLine : Svg msg\n    myLine =\n      horizontal plane [ stroke \"pink\" ] x0 y0 x1 y1\n","type":"Svg.Coordinates.Plane -> List.List (Svg.Attribute msg) -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Svg.Svg msg"},{"name":"linear","comment":" Series with linear interpolation.\n","type":"Svg.Coordinates.Plane -> (data -> Basics.Float) -> (data -> Basics.Float) -> List.List (Svg.Attribute msg) -> Svg.Chart.Dot msg -> List.List data -> Svg.Svg msg"},{"name":"linearArea","comment":" Area series with linear interpolation.\n","type":"Svg.Coordinates.Plane -> (data -> Basics.Float) -> (data -> Basics.Float) -> List.List (Svg.Attribute msg) -> Svg.Chart.Dot msg -> List.List data -> Svg.Svg msg"},{"name":"monotone","comment":" Series with monotone interpolation.\n","type":"Svg.Coordinates.Plane -> (data -> Basics.Float) -> (data -> Basics.Float) -> List.List (Svg.Attribute msg) -> Svg.Chart.Dot msg -> List.List data -> Svg.Svg msg"},{"name":"monotoneArea","comment":" Area series with monotone interpolation.\n","type":"Svg.Coordinates.Plane -> (data -> Basics.Float) -> (data -> Basics.Float) -> List.List (Svg.Attribute msg) -> Svg.Chart.Dot msg -> List.List data -> Svg.Svg msg"},{"name":"plus","comment":" ","type":"Svg.Chart.Shape"},{"name":"scatter","comment":" Series with no interpolation.\n\n    someScatter : Svg msg\n    someScatter =\n      scatter plane .x .y (full 6 circle \"blue\") points\n","type":"Svg.Coordinates.Plane -> (data -> Basics.Float) -> (data -> Basics.Float) -> Svg.Chart.Dot msg -> List.List data -> Svg.Svg msg"},{"name":"square","comment":" ","type":"Svg.Chart.Shape"},{"name":"triangle","comment":" ","type":"Svg.Chart.Shape"},{"name":"vertical","comment":" Renders a vertical line.\n\n    myLine : Svg msg\n    myLine =\n      vertical plane [ stroke \"pink\" ] x y0 y1\n\n","type":"Svg.Coordinates.Plane -> List.List (Svg.Attribute msg) -> Basics.Float -> Basics.Float -> Basics.Float -> Svg.Svg msg"},{"name":"xLabel","comment":" Renders a label for the horizontal axis.\n\n    horizontalLabel : Svg msg\n    horizontalLabel =\n      xLabel \"blue\" .timestamp format plane y datum\n","type":"List.List (Svg.Attribute msg) -> (data -> Basics.Float) -> (data -> String.String) -> Svg.Coordinates.Plane -> Basics.Float -> data -> Svg.Svg msg"},{"name":"xLabels","comment":" Renders labels for the horizontal axis.\n\n    horizontalLabels : Svg msg\n    horizontalLabels =\n      xLabels plane (xLabel \"blue\" .timestamp format) axisYCoordinate data\n","type":"Svg.Coordinates.Plane -> (Svg.Coordinates.Plane -> Basics.Float -> data -> Svg.Svg msg) -> Basics.Float -> List.List data -> Svg.Svg msg"},{"name":"xTick","comment":" Renders a single tick for the horizontal axis.\n","type":"Svg.Coordinates.Plane -> Basics.Int -> List.List (Svg.Attribute msg) -> Basics.Float -> Basics.Float -> Svg.Svg msg"},{"name":"xTicks","comment":" Renders ticks for the horizontal axis.\n\n    horizontalTicks : Svg msg\n    horizontalTicks =\n      xTicks plane height [ stroke \"pink\" ] axisYCoordinate tickPositions\n","type":"Svg.Coordinates.Plane -> Basics.Int -> List.List (Svg.Attribute msg) -> Basics.Float -> List.List Basics.Float -> Svg.Svg msg"},{"name":"yLabel","comment":" Renders a label for the vertical axis.\n\n    verticalLabel : Svg msg\n    verticalLabel =\n      yLabel \"blue\" .age format plane x y\n","type":"List.List (Svg.Attribute msg) -> (data -> Basics.Float) -> (data -> String.String) -> Svg.Coordinates.Plane -> Basics.Float -> data -> Svg.Svg msg"},{"name":"yLabels","comment":" Renders labels for the vertical axis.\n\n    verticalLabels : Svg msg\n    verticalLabels =\n      yLabels plane (yLabel \"blue\" .age format) axisXCoordinate data\n","type":"Svg.Coordinates.Plane -> (Svg.Coordinates.Plane -> Basics.Float -> data -> Svg.Svg msg) -> Basics.Float -> List.List data -> Svg.Svg msg"},{"name":"yTick","comment":" Renders a single tick for the vertical axis.\n","type":"Svg.Coordinates.Plane -> Basics.Int -> List.List (Svg.Attribute msg) -> Basics.Float -> Basics.Float -> Svg.Svg msg"},{"name":"yTicks","comment":" Renders ticks for the vertical axis.\n\n    verticalTicks : Svg msg\n    verticalTicks =\n      yTicks plane width [ stroke \"pink\" ] axisXCoordinate tickPositions\n","type":"Svg.Coordinates.Plane -> Basics.Int -> List.List (Svg.Attribute msg) -> Basics.Float -> List.List Basics.Float -> Svg.Svg msg"}],"binops":[]},{"name":"Svg.Coordinates","comment":" This module contains helpers for cartesian/SVG coordinate translation.\n\n# Plane\n@docs Plane, Axis\n\n# Plane from data\n\nYou may want to produce a plane which fits all your data. For that you need\nto find the minimum and maximum values withing your data in order to calculate\nthe domain and range.\n\n@docs minimum, maximum\n\n    planeFromPoints : List Point -> Plane\n    planeFromPoints points =\n      { x =\n        { marginLower = 10\n        , marginUpper = 10\n        , length = 300\n        , min = minimum .x points\n        , max = maximum .x points\n        }\n      , y =\n        { marginLower = 10\n        , marginUpper = 10\n        , length = 300\n        , min = minimum .y points\n        , max = maximum .y points\n        }\n      }\n\n# Cartesian to SVG\n@docs toSVGX, toSVGY, scaleSVG\n\n# SVG to cartesian\n@docs toCartesianX, toCartesianY, scaleCartesian\n\n# Helpers\n@docs place, placeWithOffset\n\n","unions":[],"aliases":[{"name":"Axis","comment":" The axis of the plane.\n\n  - The margin properties are the upper and lower margins for the axis. So for example,\n    if you want to add margin on top of the plot, increase the marginUpper of\n    the y-`Axis`.\n  - The length is the length of your SVG axis. (`plane.x.length` is the width,\n    `plane.y.length` is the height)\n  - The `min` and `max` values is the reach of your plane. (Domain for the y-axis, range\n    for the x-axis)\n","args":[],"type":"{ marginLower : Basics.Float, marginUpper : Basics.Float, length : Basics.Float, min : Basics.Float, max : Basics.Float }"},{"name":"Plane","comment":" The properties of your plane.\n","args":[],"type":"{ x : Svg.Coordinates.Axis, y : Svg.Coordinates.Axis }"}],"values":[{"name":"maximum","comment":" Helper to extract the maximum value amongst your coordinates.\n","type":"List.List (a -> Basics.Float) -> List.List a -> Basics.Float"},{"name":"minimum","comment":" Helper to extract the minimum value amongst your coordinates.\n","type":"List.List (a -> Basics.Float) -> List.List a -> Basics.Float"},{"name":"place","comment":" A `transform translate(x, y)` SVG attribute. Beware that using this and\n  and another transform attribute on the same node, will overwrite the first.\n  If that's the case, just make one yourself:\n\n    myTransformAttribute : Svg.Attribute msg\n    myTransformAttribute =\n      transform <|\n        \"translate(\"\n        ++ String.fromFloat (toSVGX plane x) ++ \",\"\n        ++ String.fromFloat (toSVGY plane y) ++ \") \"\n        ++ \"rotateX(\" ++ whatever ++ \")\"\n","type":"Svg.Coordinates.Plane -> Basics.Float -> Basics.Float -> Svg.Attribute msg"},{"name":"placeWithOffset","comment":" Place at coordinate, but you may add a SVG offset. See `place` above for important notes.\n","type":"Svg.Coordinates.Plane -> Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Svg.Attribute msg"},{"name":"scaleCartesian","comment":" For scaling a SVG value to a cartesian value. Note that this will _not_\n  return a coordinate on the plane, but the scaled value.\n","type":"Svg.Coordinates.Axis -> Basics.Float -> Basics.Float"},{"name":"scaleSVG","comment":" For scaling a cartesian value to a SVG value. Note that this will _not_\n  return a coordinate on the plane, but the scaled value.\n","type":"Svg.Coordinates.Axis -> Basics.Float -> Basics.Float"},{"name":"toCartesianX","comment":" Translate a cartesian x-coordinate to its SVG x-coordinate.\n","type":"Svg.Coordinates.Plane -> Basics.Float -> Basics.Float"},{"name":"toCartesianY","comment":" Translate a cartesian y-coordinate to its SVG y-coordinate.\n","type":"Svg.Coordinates.Plane -> Basics.Float -> Basics.Float"},{"name":"toSVGX","comment":" Translate a SVG x-coordinate to its cartesian x-coordinate.\n","type":"Svg.Coordinates.Plane -> Basics.Float -> Basics.Float"},{"name":"toSVGY","comment":" Translate a SVG y-coordinate to its cartesian y-coordinate.\n","type":"Svg.Coordinates.Plane -> Basics.Float -> Basics.Float"}],"binops":[]},{"name":"Svg.Tiles","comment":" View for creating tiled maps like heatmaps or choropleths. Note that this return a SVG element not yet wrapped\nin the `svg` tag.\n\n# Composing\n@docs Map, Tile, view\n\n# Helpers\n@docs tileWidth, tileHeight, tileXCoord, tileYCoord, proportion\n\n","unions":[],"aliases":[{"name":"Map","comment":" (You can use the helpers for calculating most of these properties. You're welcome.)\n","args":["msg"],"type":"{ tiles : List.List (Svg.Tiles.Tile msg), tilesPerRow : Basics.Int, tileWidth : Basics.Float, tileHeight : Basics.Float }"},{"name":"Tile","comment":" ","args":["msg"],"type":"{ content : Maybe.Maybe (Svg.Svg msg), attributes : List.List (Svg.Attribute msg), index : Basics.Int }"}],"values":[{"name":"proportion","comment":" For heatmaps. It calculates a value's value relative to all values.\n","type":"(a -> Basics.Float) -> List.List a -> Basics.Float -> Basics.Float"},{"name":"tileHeight","comment":" Pass the __height__ of your map, the __amount of\n tiles in a row__, and the __total number of tiles__,\n and it gives you back the height of a single tile.\n ","type":"Basics.Int -> Basics.Int -> Basics.Int -> Basics.Int"},{"name":"tileWidth","comment":" Pass the __width__ of your map, and the __amount of\n tiles in a row__, and it gives you back the width of\n a single tile.\n ","type":"Basics.Int -> Basics.Int -> Basics.Int"},{"name":"tileXCoord","comment":" Pass the __tile width__, the __amount of tiles in a row__, and\n the __tile's index__ and it'll get you it's x-coordinate.\n","type":"Basics.Float -> Basics.Int -> Basics.Int -> Basics.Float"},{"name":"tileYCoord","comment":" Pass the __tile height__, the __amount of tiles in a row__ and\n the __tile's index__ and it'll get you it's y-coordinate.\n","type":"Basics.Float -> Basics.Int -> Basics.Int -> Basics.Float"},{"name":"view","comment":" View a map!\n","type":"Svg.Tiles.Map msg -> Svg.Svg msg"}],"binops":[]}]