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
I want to always sort the bars by values, but the animation is misleading as is. Specifically, when I click on "Electrical Engineering" the second bar goes from right to left. It doesn't show that B2B and B2C are swapped. It's difficult to notice that the text values have changed. Is there a way to animate the bar position swap?
The text was updated successfully, but these errors were encountered:
Hi @tommykung, yes, in general the transitions for all charts could be improved for cases where the domain changes. Here it's just the ordering but similar problems happen when bars are removed or added.
I've started creating "eyeball tests" for visual verification of transitions. Here is the one for row chart transitions; in particular your case is something like the reverse or backward case.
In general, dc.js charts do not use keyed joins as they should, #507. However, the coordinate grid charts use d3.scale.ordinal to put the x values in the right order, so it often doesn't matter that the data is out of order. (Except if you are a line chart, #598.)
The row chart does not use a scale at all for its Y axis. So that's one possible solution, although keyed joins would be better.
Example page: http://dataviz.pitchbook.com/founders/
I want to always sort the bars by values, but the animation is misleading as is. Specifically, when I click on "Electrical Engineering" the second bar goes from right to left. It doesn't show that B2B and B2C are swapped. It's difficult to notice that the text values have changed. Is there a way to animate the bar position swap?
The text was updated successfully, but these errors were encountered: