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

Filtering functionality in legends #180

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

shubh0107
Copy link
Contributor

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

@vercel
Copy link

vercel bot commented Mar 30, 2020

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

@sibeshkar
Copy link
Collaborator

For some, this doesn't seem to be deploying since all checks have failed. Do fix

…ad of updating the graph variable | Played around with the graph physics
@shubh0107
Copy link
Contributor Author

shubh0107 commented Mar 31, 2020

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.

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

Successfully merging this pull request may close these issues.

2 participants