Small Improvement to Documentation
wjdhamilton opened this issue · comments
Thank you very much for writing this library, it appears to be both practically useful as well as a good education in how to think about charts.
Can I suggest that you have a look at the documentation for Scale
? It isn't very clear which of the parameters to the ContinuousScale
function is the domain and which is the range. There is a clue in the Scale.time
function, where the Posix
values must be the domain, but for instance, Scale.linear
has the signature Scale.linear: (Float, Float) -> (Float, Float) -> ContinuousScale Float
, which is more opaque.
Perhaps an example like:
makeContinuousX : (Float, Float) -> (Float, Float) -> ContinuousScale Float
makeContinuousX domain range =
Scale.linear domain range
-- Create a scale that maps inputs between 0 and 1 to a range of 100 pixels
makeContinuousX (0,100) (0,1)
Or whatever. I'm sure you'll have a better idea than me!
👍
Good point, I'll try to add a small note.