Skip to content
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

vertex.spells data raising "sliceRenderData.node[item[direction][0]] is undefined" (render.d3movie) #54

Open
cboulanger opened this issue Oct 20, 2023 · 2 comments

Comments

@cboulanger
Copy link

A particular type of vertex.spells data leads to the "sliceRenderData.node[item[direction][0]] is undefined (line 1285)" error in the browser.

The data in vertex_spells_no_error.csv, which has onsets and termini for each individual year, works fine. The dataset in vertex_spells_error.csv has the min(onset) and max(terminus) for each of the vertex_ids in the first dataset. The aim is to reduce the number of spells and to provide a less "jumpy" visualization. I do not understand why dataset 1 works and dataset 2 does not.

The code for generating the network is here.

@cboulanger
Copy link
Author

Ok, it seems like there needs to be an exact match of the length of the edge and vertex spells. When I try to aggregate subsequent vertex spells into one, whereas there are intermittent edge spells, the spell durations do no longer line up and this throws off the d3 rendering. I found this out by running network.dynamic.check(dynNet, verbose = TRUE, complete = TRUE) when it told me that there were active edges in the network for non-active vertices.

Maybe it would make sense to implicitly run the check when generating the d3movie and warning the user.

@cboulanger cboulanger changed the title vertex.spells data raising "sliceRenderData.node[item[direction][0]] is undefined" vertex.spells data raising "sliceRenderData.node[item[direction][0]] is undefined" (render.d3movie) Oct 22, 2023
@skyebend
Copy link
Contributor

there is also a reconcile.activity function that can extend or shorten vertex or edge spells to bring them into alignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants