[{"name":"LineChart","comment":"\nThis module is for creating Line Charts.\n\nNOTE: Go through the Setup section initially. It is required to get the tooltip functionality of this library.\n\n# Setup (Model, Msg, init and update)\n@docs ChartModel, ChartMsg, initChartModel, updateChartModel\n\n# Creating data\n@docs LineChartDataSet, createDataSet, LineChartData, createData\n\n# Plotting\n@docs lineChart\n\n# Configuring\n@docs LineChartOptions, defaultLineChartOptions, setChartWidth, setChartHeight, setTooltipWidth, setTooltipHeight, setLabelWidth\n@docs setLabelRotation, setValueWidth, setPointRadius, setLegendWidth, setLegendSpacing\n","unions":[{"name":"ChartModel","comment":"\nNeed this for determining if a point on the chart has been hovered on. This should be a part of your model.\n\n    type Model =\n      { otherData : OtherData\n      , chartModel : ChartModel\n      }\n","args":[],"cases":[]},{"name":"ChartMsg","comment":"\nUsed to handle tooltips for the line chart. This should be added to your own msg type.\n\n    type Msg\n      = Msg1 Data1\n      | Msg2 Data2\n      | ChartMessage ChartMsg\n","args":[],"cases":[]},{"name":"LineChartData","comment":"\nRepresents the data that will be used to draw the Line Chart. Many lines can be drawn in one chart.\n","args":[],"cases":[]},{"name":"LineChartDataSet","comment":"\nRepresents one line of the Line Chart.\n","args":[],"cases":[]},{"name":"LineChartOptions","comment":"\nUsed to configure the line chart.\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"createData","comment":"\nTakes a List of string labels, and data sets. Each data set represents a line on the Line Chart.\n\n    import Palette.X11 exposing (green, red)\n    import TransparentColor exposing (opaque, fromColor)\n\n    data :: LineChartData\n    data = createData [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\"]\n      [ createDataSet \"Wake up time\" [7, 8, 9, 8, 7] (fromColor opaque green)\n      , createDataSet \"Sleeping time\" [23, 22, 21, 22, 23] (fromColor opaque red)\n      ]\n","type":"List.List String.String -> List.List LineChart.LineChartDataSet -> LineChart.LineChartData"},{"name":"createDataSet","comment":"\nCreate a LineChartDataSet by providing:\n1. A label for the dataset\n2. A list of values\n3. A color which will be used to plot this dataset on the chart. [Click here for the color module](https://package.elm-lang.org/packages/tesk9/palette/latest/TransparentColor).\n\nOne dataset corresponds to one line on the chart.\n\n    import Palette.X11 exposing (black)\n    import TransparentColor exposing (opaque, fromColor)\n\n    serverCost :: LineChartDataSet\n    serverCost = createDataSet \"Server Cost\" [ 20.4, 30.2, 10] (fromColor opaque black)\n","type":"String.String -> List.List Basics.Float -> TransparentColor.TransparentColor -> LineChart.LineChartDataSet"},{"name":"defaultLineChartOptions","comment":"\nDefault options for configuring the line chart.\n\n    options : LineChartOptions\n    options =\n      setChartWidth 1200 defaultLineChartOptions\n      |> setChartHeight 800\n      |> setTooltipWidth 200\n      |> setTooltipHeight 100\n      |> setLabelWidth 200\n      |> setLabelHeight 200\n      |> setPointRadius 4\n","type":"LineChart.LineChartOptions"},{"name":"initChartModel","comment":"\nInitial state for ChartModel type. Should be a part of your init.\n\n    init : Model\n    init =\n      { otherData = {...}\n      , chartModel = initChartModel\n      }\n\n","type":"LineChart.ChartModel"},{"name":"lineChart","comment":"\nUsed to draw the line chart. The arguments are:\n1. Options to configure the line chart.\n2. The data to be displayed on the chart.\n3. A msg constructor to convert ChartMsg into your own msg type.\n4. The chart model, which should be stored inside your Elm model.\n\nFollowing code shows how to setup parts 3 and 4.\n\n    import LineChart exposing (lineChart)\n\n    type Model =\n      { otherData : OtherData\n      , chartModel : ChartModel\n      }\n\n    type Msg\n      = Msg1 Data1\n      | Msg2 Data2\n      | ChartMessage ChartMsg\n\n    init : Model\n    init =\n      { otherData = {...}\n      , chartModel = initChartModel\n      }\n\n    view : Model -> Html Msg\n    view model = lineChart defaultLineChartOptions data ChartMessage model.chartModel\n\n    update : Msg -> Model -> Model\n    update msg model =\n      case msg of\n        ChartMessage chartMsg ->\n          { model\n          | chartModel = updateChartModel chartMsg model.chartModel\n          }\n        NoOp -> model\n","type":"LineChart.LineChartOptions -> LineChart.LineChartData -> (LineChart.ChartMsg -> msg) -> LineChart.ChartModel -> Html.Html msg"},{"name":"setChartHeight","comment":"\nSet the Chart Height.\n","type":"Basics.Int -> LineChart.LineChartOptions -> LineChart.LineChartOptions"},{"name":"setChartWidth","comment":"\nSet the Chart Width.\n","type":"Basics.Int -> LineChart.LineChartOptions -> LineChart.LineChartOptions"},{"name":"setLabelRotation","comment":"\nSet the Label Rotation in degrees.\n1. If you provide rotation value (even if it is `Just 0`), label will be rotated from its end, counter-clockwise.\n2. If you don't provide a value (Nothing), label will be center aligned with its axis.\n","type":"Maybe.Maybe Basics.Int -> LineChart.LineChartOptions -> LineChart.LineChartOptions"},{"name":"setLabelWidth","comment":"\nSet the Label Width.\n","type":"Basics.Int -> LineChart.LineChartOptions -> LineChart.LineChartOptions"},{"name":"setLegendSpacing","comment":"\nSet the spacing between two legend keys.\n","type":"Basics.Int -> LineChart.LineChartOptions -> LineChart.LineChartOptions"},{"name":"setLegendWidth","comment":"\nSet the width of one legend key.\n","type":"Basics.Int -> LineChart.LineChartOptions -> LineChart.LineChartOptions"},{"name":"setPointRadius","comment":"\nSet the point radius on the chart. Hovered points double their radius.\n","type":"Basics.Int -> LineChart.LineChartOptions -> LineChart.LineChartOptions"},{"name":"setTooltipHeight","comment":"\nSet the Tooltip Height.\n","type":"Basics.Int -> LineChart.LineChartOptions -> LineChart.LineChartOptions"},{"name":"setTooltipWidth","comment":"\nSet the Tooltip Width.\n","type":"Basics.Int -> LineChart.LineChartOptions -> LineChart.LineChartOptions"},{"name":"setValueWidth","comment":"\nSet the Value Width.\n","type":"Basics.Int -> LineChart.LineChartOptions -> LineChart.LineChartOptions"},{"name":"updateChartModel","comment":"\nUsed to update the ChartModel type. This should be used inside your update function.\n\n    update : Msg -> Model -> Model\n    update msg model =\n      case msg of\n        ChartMessage chartMsg ->\n          { model\n          | chartModel = updateChartModel chartMsg model.chartModel\n          }\n        NoOp -> model\n","type":"LineChart.ChartMsg -> LineChart.ChartModel -> LineChart.ChartModel"}],"binops":[]}]