This module creates a GitHub-style contribution graph based on a simple Contribution model. The original intent is to have leaderboard, so each contribution has a point value associated.
Opaque data model that holds the internal state of the Contribution Graph
{ repoCommitUrl : String }
Config options that are specific to your provider and your repo
Example:
config =
{ repoCommitUrl = "https://github.com/justinrassier/elm-contribution-graph/"
}
{ mergeTimestamp : Time.Posix
, title : String
, commitSha : String
, points : Basics.Int
}
Contribution data model used to display data in the graph.
view : Model -> Html.Styled.Html Msg
View function to render contribution graph as an SVG
update : Msg -> Model -> ( Model, Platform.Cmd.Cmd Msg )
Standard update function that handles Contribution Graph interactions. Hook up to your update function using Cmd.map
Messages that the Contribution Graph responds to update its internal state
init : Config -> List Contribution -> ( Model, Platform.Cmd.Cmd Msg )
Initialize the Model
, which is an opaque type that controls the internal state of the graph
setContributions : List Contribution -> Model -> Model
Setter for the list of Contributions in the Model to render