yFiles for JavaFX is shipped with its own armada of graph analysis algorithms to attack problems to efficiently visualize your data. One of these is the shortest path search which is visualized in this small demo.
The shortest path is calculated and marked in red as soon as at least one source and one target are selected. Shortest paths can be calculated for both directed and undirected edges. You can select different automatic layout styles and observe how the changed edge lengths affect the shortest path search.