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/
Use in Ticks.custom for creating "nice" values.
ticksConfig : Ticks.Config msg
ticksConfig =
Ticks.custom <| \dataRange axisRange ->
List.map Tick.int (valuesWithin dataRange)
valuesWithin : Coordinate.Range -> List Int
valuesWithin =
Values.int (Values.around 3)See full example here.
** What are "nice" numbers/integers/datetimes? **
When I say "nice", I just mean that I try to calculate intervals which begin with 10, 5, 3, 2, 1 (adjusted to magnitude, of course!). For dates, I try to hit whole days, weeks, months or hours, minutes, and seconds.
Makes nice floats.
valuesWithin : Coordinate.Range -> List Float
valuesWithin =
-- something like [ 1, 1.5, 2, 2.5 ]
Values.float (Values.exactly 4)Will get you around the amount of numbers you pass it, although it will prioritize getting "nice" numbers.
Will get you closer to the amount of numbers you pass it, although not actually exactly, since you still want decently "nice" numbers.
P.S. If you have a better name for this function, please contact me.
Makes nice times.
valuesWithin : Coordinate.Range -> List Float
valuesWithin =
Values.time 5See full example here.
Makes evenly spaced floats.
Arguments:
ticksConfig : Ticks.Config msg
ticksConfig =
Ticks.custom <| \dataRange axisRange ->
List.map Tick.float (Values.custom 45 10 dataRange) ++
-- ^ Makes [ 25, 45, 55, 65, 75, 85, 95 ]
List.map Tick.long (Values.custom 30 20 dataRange)
-- ^ Makes [ 30, 50, 70, 90 ]See full example here.
Makes nice integers.
See full example here.