-
Notifications
You must be signed in to change notification settings - Fork 28
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
Attributes in the information pane are not in the correct order #47
Comments
Hello, I am also interested in this issue. As stated in the JSon doc, the order of attribute is random. My guess is that in the incoming functionnality 'Attributes' it will be possible to order the attributes and select/unselect. For now maybe we can change the data order in right panel around this line of main.js but I don't know how to do it. What is the best solution to reorder data.json attributes that are shown in the right panel? Thanks, |
@Princen, I have posted a solution here: http://blogs.oii.ox.ac.uk/vis/?p=191#comments "Mahdi on September 8, 2014 at 1:45 am said: |
Thank you, e.reverse(); I think it is the only thing to do with the JSon attribute issue. Order it whith array modifications. |
Thanks, @Mahdimo for reporting this and providing the temporary work around. I swear reordering attributes in Gephi's data table used to change the way the attributes were given to the plugin when I request them and write the data.json file. Regardless, a better solution anyway is to allow de/selection and reordering in the plugin dialogue. I will try to incorporate this in a future plugin release. In the meantime, this work around is fine. Another option is to rewrite the data.json file to order the attributes as desired in that file. This would be done with e.g., a simple python script one time such as
|
I’ve run into a different variation of this same problem, which I think means that the two solutions noted above won’t work for me. My nodes have many attributes in Gephi, and when there’s a null value, SigmaJS isn’t actually exporting those attributes for a given node. If the column is blank, the data.json file just doesn’t contain that attribute. This works great because then the info pane only includes the headers & info that are applicable to a given node. But, it means that the data.json file not only has “scrambled” columns, it also doesn’t have the same attributes/columns in each node. So I don’t know how I could re-order the attributes using either of the solutions in this thread. Any ideas on how I could handle that? Here’s an example of what my nodes might look like in data.json: { |
@a10martin , the python code given in this comment will work even if not all the attributes appear in every node. You will just have to update the |
@a10martin If I understand correctly, you want to manage to have common attributes in the same order but in your example "Category of Node" and “US State" are ordered. If you want to reorder them, the python script is the best solution. |
Thanks, @Princen and @computermacgyver. I do want to be able to re-order the attributes, both the common ones (in all nodes) and the non-common ones (that only appear in some nodes), since they are coming out of Gephi "scrambled." For instance, "Area of Study" is a much more important parameter than "US State," which I would prefer be displayed last in the info pane. I actually like the fact that the null attributes don't come out of Gephi, as it gives a much cleaner result in the SigmaJS information pane. I'll give the Python approach a try! |
The attributes in the information pane (appearing after choosing a node) is not in the same order as my data table in Gephi. I was wondering how I can change the order of them in the information pane.
Thanks,
Mahdi
The text was updated successfully, but these errors were encountered: