return breaks with or without min/max
Closed this issue · 1 comments
TomBor commented
For now, each statsbreaks methods return breaks as an array that start with min and end with max.
Is it always necessary? Adding min/max is not a core part of each algorithm. Each method purpose is to find breaks.
And I think there is legit use cases when we just want breaks without min/max. For example, in Observable Plot, a threshold scale expect breaks without min/max in domain.
Proposal
Add a a boolean minmax
option with true
as default for backward compatibility.
How
if (minmax) return breaks.slice(1,-1)
neocarto commented
Thanks Thomas. I'll include it in the next version.