Open wcarson opened 3 weeks ago
Please check if you can use the filter function as in this example: https://code.balkan.app/filtering-with-search#JS
Thanks for the quick reply! If I understand correctly this filtering works is by tagging nodes and setting the template for tagged nodes to be invisible. My "expand" buttons have the children count on them. I'm assuming this approach would cause things like children counts not to match the visible nodes (i.e. if a node has 4 children and 2 are filtered, the children count would still show 4?).
What I have working that keeps the child counts matching is doing a chart.load
with the filtered set of nodes, but load seems to reset the entire chart. Is there a way to persist the zoom/scroll...or is this not a good way to accomplish this?
I'm close to getting this work the way I want as follows:
chart.load
is used to reload the chart with filtered dataThis works great when filtering nodes out. When nodes get added back in, the expand/collapse state gets "confused". See attached screenshots.
So, you still have issue, because the unfiltered nodes are not shown?
Hi @ZornitsaPesheva. That's correct. There are 2 issues:
If I click the expand button on the parent node the chart becomes correct again (as in the first screenshot)
Could you please create a simple example to isolate the issue?
I have a large set of nodes (10K+) that I want to filter using a custom filter UI (tl;dr more complex UI than the
filterBy
can provide).I have a method that returns the filtered list of org nodes based on the filter UI, but I don't know how to update the chart in-place. The desired behavior is that the chart remain at it's current zoom/scroll and nodes appear/disappear based on the updated filter like the
filterBy
feature does. I've been trying to use thechart.update
method to update the data andchart.draw
to redraw the chart but having no luck.Any suggestions on how to do this?