Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terezka/intervals
A library for producing nice intervals for charts.
https://github.com/terezka/intervals
Last synced: 20 days ago
JSON representation
A library for producing nice intervals for charts.
- Host: GitHub
- URL: https://github.com/terezka/intervals
- Owner: terezka
- License: bsd-3-clause
- Created: 2021-02-25T13:12:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-13T08:43:06.000Z (8 months ago)
- Last Synced: 2024-05-09T07:12:12.050Z (6 months ago)
- Language: Elm
- Size: 38.1 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# intervals
A library for producing nice intervals for charts. Useful in combination with `terezka/charts`.
```bash
$ elm install terezka/intervals
``````elm
import Intervals
integerTicks : List Int
integerTicks =
Intervals.ints (Intervals.around 10) (Intervals.Range 0 100)
-- [ 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 ]floatTicks : List Int
floatTicks =
Intervals.floats (Intervals.around 5) (Intervals.Range -5 10)
-- [ -5, -2.5, 0, 2.5, 5, 7.5, 10 ]```