Renamed to volgariver6/line-charts. That is where the repository lives now. It has not been published as a package under the new name.
Versions published as lauber00/line-charts still install under that name. 4 versions of 4 come from the new location (see their notes).
Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/volgariver6/line-charts.
What we checked: The repo moved to github.com/volgariver6/line-charts. Rebuilt with git archive from commit 1767f18f9fd0 of https://github.com/volgariver6/line-charts (zip prefix lauber00-line-charts-8808ae7/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 5881948ccc6b0a273f283741d4b711667795ab55.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/lauber00/line-charts/zipball/1.0.2/
Makes 1px wide lines.
Pass the desired width of your lines.
chartConfig : LineChart.Config Data msg
chartConfig =
{ ...
, line = Line.wider 3
, ...
}See the full example here.
Makes the line, to which the data in the first argument belongs, wider!
chartConfig : Maybe Data -> LineChart.Config Data Msg
chartConfig hovered =
{ ...
, line = Line.hoverOne hovered
, ...
}See the full example here.
Edit as style of a line based on its data.
lineConfig : Maybe Data -> Line.Config Data
lineConfig maybeHovered =
Line.custom (toLineStyle maybeHovered)
toLineStyle : Maybe Data -> List Data -> Line.Style
toLineStyle maybeHovered lineData =
case maybeHovered of
Nothing -> -- No line is hovered
Line.style 1 identity
Just hovered -> -- Some line is hovered
if List.any ((==) hovered) lineData then
-- It is this one, so make it pop!
Line.style 2 (Manipulate.darken 0.1)
else
-- It is not this one, so hide it a bit
Line.style 1 (Manipulate.lighten 0.35)See the full example here.
Pass the width of the line and a function transforming the line's color.
vanilla : Line.Style
vanilla =
Line.style 1 identity
emphasize : Line.Style
emphasize =
Line.style 2 (Manipulate.darken 0.15)
hide : Line.Style
hide =
Line.style 1 (Manipulate.lighten 0.15)
blacken : Line.Style
blacken =
Line.style 2 (\_ -> Colors.black)See the full example here.
Use in the
LineChart.Configpassed toLineChart.viewCustom.