Code Monkey home page Code Monkey logo

Comments (6)

armish avatar armish commented on August 26, 2024

After playing with the plots a bit, it does look like they sometimes reload prematurely and unintentionally reset some of the attributes. As far as I can tell, the main issue is async messaging between the Shiny server and the client, which interferes with the event firing that happens when you customize something. Another issue is that the graphs are relatively big so they make use of significant memory (which is fine) hence some JS code can get executed with delay.

The way to solve this is to introduce some sort of promise library and make sure all the JS events behave well and don't override one another; but the question is: does it worth it the rewrite? I would say no if you have limited time and don't want to invest too much energy as although the app is somewhat buggy, in general it works nice and there is minimal risk of losing heavy setup/data due to these bugs.

Having said that, if you list some of the specific issues that you think might annoy the people the most (e.g. made-up issue: colors are not applied to the nodes even if you configure it specifically), we can knock them out and make sure the core functionality almost always works.

from coral.

dphansti avatar dphansti commented on August 26, 2024

Thanks Armish. I can definitely live with the stuttering. Shiny is all about real time updating (reactive plots). And the force network is large/memory intensive. It is understandable to see it chug a bit. With that being said, I should reorganize the reactive code a little bit because sometimes the plot reloads when it really doesn't need to.

But, it would be nice if we could eliminate the 'black node bug'. If you are looking at the force network and you make a change that should alter the colors, a lot of the time the nodes turn black. This can be corrected by making a change that does not change node colors (e.g. choose advanced setting and click 'labels'). I have downloaded svg files for plots with the black node effect and after making a change that colors them correctly. And it looks like there is an extra circle and text plotted on top of the correctly colored circle. I have no idea why this is happening. Here is an example for them bad and good svgs.

<g class="node" transform="translate(430.3076512697267,220.26785363016538)"><circle r="7.5" stroke-width="1" opacity="1" stroke="#3f9ffc" style="fill: rgb(63, 159, 252);"></circle><text dy=".35em" font-family="Helvetica" text-anchor="middle" font-size="7px">  eEF2K</text><circle r="7.5"></circle><text dy=".35em" font-family="Helvetica" text-anchor="middle" font-size="7px">  eEF2K</text></g>

# correctly colored nodes 
<g class="node" transform="translate(654.4225605756126,706.5184192173509)" ><circle r="7.5" stroke-width="1" opacity="1" stroke="#3f9ffc" style="fill: rgb(63, 159, 252);"></circle><text dy=".35em" font-family="Helvetica" text-anchor="middle" font-size="7px">  eEF2K</text></g>```

 



from coral.

dphansti avatar dphansti commented on August 26, 2024

FWIW, I have checked the json files that are created for the black and non black plots and they are identical.

from coral.

dphansti avatar dphansti commented on August 26, 2024

On my students' computers (2016 imacs) things run pretty smoothly. They rarely get the black boxes. My comp (2010 mac pro) gets black boxes almost every time I try to change the node colors. This also seems to differ between browsers. Are you experiencing it a lot? or at all?

from coral.

armish avatar armish commented on August 26, 2024

I was also getting the black node issue pretty frequently on my mac pro (2017). Unfortunately, this is the part of the Web that sucks the most: browser incompatibility and covering all the bases.

#11 fixed the black node issue for me but it would be great if others can test it so we know I haven't fixed it only for myself ;)

from coral.

dphansti avatar dphansti commented on August 26, 2024

Thanks Arman. That seemed to fix the issue.

from coral.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.