-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
knots in linechart transition #1144
Comments
It looks like the data being added is out of order (in the past) then later being sorted.. that's what causes the line to go backwards. |
I'm having trouble viewing your GIF (it only runs once, and the effect is subtle). Does the problem look like one of the problems you can see in this testing page? http://dc-js.github.io/dc.js/transitions/bar-transitions.html If so, (or if you can repro similar problems in the area chart on the main example page) this is an instance of #507. And this is the one regression blocking the release of 2.0. (You could also try 1.7.5 to verify it works there, if you aren't using later features.) |
Indeed the moment it makes a knot seems to be when there's new data classes inserted in the line, resulting in a general mix-up of the control points. In my example the new data are the years 1954-1957 or so (beginning of the dimension), and the visual problem disappears if I reverse-sort the data in Hardly a generic solution, but it's really difficult to interpolate lines that don't span the same number of vertices (they are interpolated as strings not as sets of dots where each would be interpolated independently). As I understand it, this is similar to #507, but a bit different. In #507 the reason is addition/removal of new elements in the SVG— the elements that get removed don't transition to "out of screen", they only get one of their coordinates to transition); here it's the addition of new control points in the same Hope this makes sense. (I'm sorry I wasn't able to make it work with dc 1.7.3 to confirm.) |
I think I get it. Yes I think this is another manifestation of the same problem, or at least should be solved by the same solution. However I'll keep this open to verify once that solution is in place. What I think will work is:
Incidentally, I glean from your description of the problem that this issue would probably also be present in 1.7, since it also joined by index. |
In this example I'm adding data coming from a papaparse stream and the transition makes these funky knots.
The text was updated successfully, but these errors were encountered: