'echarts: focus node adjacency in graph on click

In past echarts versions where was a focusNodeAdjacency action which allowed to focus on a node in a graph.
In newer versions this action is removed, and I can't seem to find anything that replaces it with the same functionality. Highlight comes close but does not function like I want.

Is there any way around this? I would like to make only a node and its neighbors be visible on click on the node.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source