Conversation
…o narrow to accommodate the domain. fixes #242
| step, | ||
| bandwidth, | ||
| round = false, | ||
| roundingPrecision = 1, |
There was a problem hiding this comment.
Should we employ the same test as d3-axis so that roundingPrecision can default to 0.5 if devicePixelRatio > 1?
https://github.com/d3/d3-axis/blob/4fc4f2bd287de20c4fc5f1da447ae1194d3acca6/src/axis.js#L39
Also, I think internally perhaps we should store the inverse rounding precision as an integer (e.g., precision = 2 if we want to round to the nearest half-pixel), so as to reduce the likelihood of floating point error.
Also, how about the shorter name scale.precision. Is that too ambiguous?
There was a problem hiding this comment.
Agree with using devicePixelRatio and integer representation. For the name, I think precision presents the risk of being ambiguous (though we have no use for a scale's precision yet).
fixes #242