请查看jointjs http://jointjs.com/demos/erd。我用它制作了ER图。此外,请查看https://github.com/cpettitt/dagre。您可以使用它绘制有向或无向图。