henne90gen / elm-pandas-visualization / LineChart

This module takes care of drawing line charts

Create line charts

lineChart : { dimensions : ( Basics.Float, Basics.Float ), lineType : LineType, xFunc : DataFrame.XValueMapper a, lines : List (LineConfig a), dataFrame : DataFrame a, xAxisLabel : Maybe String, yAxisLabel : Maybe String, yMin : Maybe Basics.Float, yMax : Maybe Basics.Float } -> TypedSvg.Core.Svg msg

Creates a line chart with multiple lines

Create interactive line charts

lineChartInteractive : { dimensions : ( Basics.Float, Basics.Float ), lineType : LineType, xFunc : DataFrame.XValueMapper a, lines : List (LineConfig a), dataFrame : DataFrame a, xAxisLabel : Maybe String, yAxisLabel : Maybe String, yMin : Maybe Basics.Float, yMax : Maybe Basics.Float, cursor : CursorConfig, model : Model, msgMapper : Msg -> msg } -> TypedSvg.Core.Svg msg

Creates an interactive line chart with multiple lines

initialModel : String -> Model

Initializes the model

update : Msg -> Model -> ( Model, Platform.Cmd.Cmd Msg )

Updates the model with the given message

subscriptions : Model -> Platform.Sub.Sub Msg

Subscribes to various events to allow interactive charts to function properly


type alias Model =
{ id : String
, chartInfo : ChartInfo
, mousePosition : Maybe MousePosition 
}

Model for the internal state for interactive charts


type Msg

Msg object to allow interactions with an interactive chart