For text-based diagrams, I tend to reach for PlantUML https://plantuml.sourceforge.net/ (there are plugins for Doxygen, too, to lift those from comments). It uses Graphviz under the hood, and can output a number of different image formats.
There is also https://mermaid.js.org/#/, which has a similar purpose, but seemingly fewer of the historical idiosyncracies of PlantUMN