Conversation
|
It works to solve the collapsing ordinal scale issue #72; for a medium number of bars, it makes the inset a bit fuzzy (which is why we're rounding in the first place). Have you considered d3/d3-scale#243 instead? |
|
This doesn’t address #72 — in this PR ordinal scales still default to round: true. The only thing this changes is that when round = false, this removes implicit rounding that was happening inside the rule and tick marks, and within the axis. The axis rounding only applied to quantitative scales (which have scale.interpolate set to d3.interpolateRound). So, I expect we want d3/d3-scale#243 in addition to this PR. And we might also want to default round to false for ordinal scales, even if that means fuzzy bars, or perhaps we want a new round = "auto" which defaults to true only if the cardinality of the ordinal domain is low enough that the behavior is reasonable. |
|
OOps right, I tested on a binned bar chart 🤭 |
This turns off implicit rounding that was happening in axes, tick, and rule. If you want rounding, you can turn it on by setting round: true on the scale, but it feels a bit odd to say round: false but still get rounding.