You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welp! Another bug of sorts -- currently seeing this on beta-31.
The gist is that setting the valueAccessor of a numberDisplay to a function that can divide by zero will cause tweening to malfunction when filtering away from Infinity -- the display gets stuck at NaN until the numberDisplay is redrawn once more.
To reproduce, select and deselect the "Not Rush" slice -- you'll notice the numberDisplay labeled "borks" will, true to its name, get stuck at NaN on the way out. Just calling dc.redrawAll (i.e. clicking the "Redraw Charts" button) is enough to get it un-stuck.
The second number display (labeled "works") has its valueAccessor modified to explicitly return NaN when the divisor is zero -- this makes it work just fine for whatever reason.
[aside: Although I technically may be able to work around this in my own app, I've gotten into the habit of converting NaNs to positive or negative Infinity for table sorting purposes, meaning there are cases where a value of Infinity makes sense in context. I don't want to lose that.]
The text was updated successfully, but these errors were encountered:
Hmm, numerically speaking, I'd expect d3.interpolateNumber to get stuck on infinity rather than going to NaN. But either way we'll probably have to special-case it!
It's a very simple component, if you want to take a look...
Taking a quick look, It indeed ought to be a simple one-liner if we're allowed to alias Infinity as 0 for the first parameter of the d3.interpolateNumber call. That's how it treats NaNs currently, so it's in "should work" territory.
Welp! Another bug of sorts -- currently seeing this on beta-31.
The gist is that setting the valueAccessor of a numberDisplay to a function that can divide by zero will cause tweening to malfunction when filtering away from Infinity -- the display gets stuck at NaN until the numberDisplay is redrawn once more.
Good ol' JSFiddle time:
https://jsfiddle.net/fzkjch04/1/
To reproduce, select and deselect the "Not Rush" slice -- you'll notice the numberDisplay labeled "borks" will, true to its name, get stuck at NaN on the way out. Just calling dc.redrawAll (i.e. clicking the "Redraw Charts" button) is enough to get it un-stuck.
The second number display (labeled "works") has its valueAccessor modified to explicitly return NaN when the divisor is zero -- this makes it work just fine for whatever reason.
[aside: Although I technically may be able to work around this in my own app, I've gotten into the habit of converting NaNs to positive or negative Infinity for table sorting purposes, meaning there are cases where a value of Infinity makes sense in context. I don't want to lose that.]
The text was updated successfully, but these errors were encountered: