Add support for `IntProgression`, `CharProgression`, and `LongProgression` in Scales
- Dominant language
- Kotlin
- Stars
- 744
- Forks
- 27
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
Currently, the scaling functionality in the library lacks support for `IntProgression`, `CharProgression`, and `LongProgression`.
> Provide a transformation mechanism for reversed progressions, if applicable.
### Examples:
1. Creating a continuous positional scale using `IntProgression`:
```kotlin
val limits: IntProgression = -5..7
val scale = Scale.continuousPos(limits)
```
Expected Result:
`PositionalContinuousScale(min=-5, max=7, nullValue=null, transform=null)`
2. Creating a continuous positional scale with reversed `IntProgression`:
```kotlin
val limits: IntProgression = 10 downTo 1
val scale = Scale.continuousPos(limits)
```
Expected Result:
`PositionalContinuousScale(min=10, max=1, nullValue=null, transform=null)`
or
Expected Result:
`PositionalContinuousScale(min=1, max=10, nullValue=null, transform=Transform.Reverse)`
Contributor guide
Research direction
Start at the Scale.continuousPos entry point and inspect how current limits are handled. Add support for IntProgression, CharProgression, and LongProgression, including a defined treatment of reversed progressions; verify completion against the two IntProgression examples and their expected scale results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100