This message was deleted.
# help
s
This message was deleted.
m
I think the easiest way to do this now would be specifying the value as a function, like
(d) => d.value < 0 ? -1 : d.value > 200 ? 201 : d.value
. I could see adding a clamp option to the bin transform, but that would treat values as <0 as 0, and values >200 as 200.
👍 1
c
Thanks for you help @Mike Bostock, thats indeed a simple solution!
With this solution, one would still need to manually add a greater or smaller than sign to the label for the first and last bin, though, e.g.
Copy code
x: {
  tickFormat: (d, i, arr) => (i === arr.length - 1 ? ">" + d : d)
}