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
In a line chart, when all the data points have a zero value, I would expect them to show at the bottom, like this:
That's the way dc.js works with d3 5.7.0 or lower. In d3 5.8.0 they "fixed" the way that scales map the value when the domain is collapsed (d3/d3-scale#117). Now it shows like this instead:
I guess it could make sense if all the points had a value of 42, for instance. But when all of them are 0, it just looks weird.
Is there any way to workaround this issue, using dc.js, without having to redefine the Y axis domain myself?
This is the code I used for the examples, it's available also at codepen:
Huh, I'd noticed charts doing this but I hadn't narrowed it down to a change in D3.
I agree, it's annoying, but since you have to tell D3 a domain when it would otherwise, be empty, I can't think of anything simpler than preRender/preRedraw hooks:
In a line chart, when all the data points have a zero value, I would expect them to show at the bottom, like this:
That's the way dc.js works with d3 5.7.0 or lower. In d3 5.8.0 they "fixed" the way that scales map the value when the domain is collapsed (d3/d3-scale#117). Now it shows like this instead:
I guess it could make sense if all the points had a value of 42, for instance. But when all of them are 0, it just looks weird.
Is there any way to workaround this issue, using dc.js, without having to redefine the Y axis domain myself?
This is the code I used for the examples, it's available also at codepen:
The text was updated successfully, but these errors were encountered: