Open shubh0107 opened 4 years ago
This pull request is being automatically deployed with ZEIT Now (learn more). To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://zeit.co/someshkar/covid19india-network/lim32gvxi ✅ Preview: https://covid19india-network-git-fork-shubh0107-legend-filter.someshkar.now.sh
For some, this doesn't seem to be deploying since all checks have failed. Do fix
Hi @someshkar ,
I tried a different approach of updating the data. Instead of directly linking the graph
prop of the Graph
component, i used a function provided by the library called setData
, just to see if it affects the performance. Maybe it has improved the initial render time, not sure about the physics stabilization which the library carries out after that. I even experimented with the physics algo used by the library. Changed it from 'barnesHut' to 'forceAtlas2Based' to check if this improved the stabilization.
NB: This PR is still not ready as the edges are missing in some cases.
Let me know your thoughts. Thanks.
Hi @someshkar ,
So i have tried to make this functionality where the user can click on the legend and filter out the nodes on the network. Currently it works only for the 3 types of patients. However, there is still some issues remaining. I'll be fixing them soon.
According to my implementation, if the user filters nodes from the legend and then changes the global filter(the ones on the left filter panel), the applied legend filter persists. I'm not sure whether this is right or even required. The filtering of nodes seems to work fine but the issue is with the edge creation. In some cases, the edges appearing. That has to be fixed.
The patient info grid also updates itself to show info of the first patient from
graph.nodes
of the visible graph and searching as well as selecting of nodes also seems to work fine.Let me know your thoughts. Thanks!
Reference: Issue #135