dot2echarts -- convert graphs in Dot format into interactive Apache ECharts

2 min read

Apache ECharts is an Open Source visualization library, which I’ve previously used in a few of my projects.

One of them is makefile-graph, a CLI tool, which parses GNU Make internal database and generates a graph, representing the relationships of the discovered Makefile targets.

The makefile-graph tool outputs the resulting graph either in Dot format or Apache ECharts. I’ve talked about makefile-graph in a previous post, which you can read here.

For quite some time I have been using a tool, which I’ve developed long ago, but never got the chance to actually clean it up and publish it. This tool allows you to convert a graph from Dot format into Apache ECharts, and gives you a nice interactive experience for inspecting graphs.

The tool is written in Go and you can find it in the dnaeon/dot2echarts repo. In order to install it simply run the following command.

go install github.com/dnaeon/dot2echarts/cmd/dot2echarts@latest

Here is a demo which of it, which shows the Go module dependency graph of dot2echarts itself.

The graph above is generated by piping the result of go mod graph to modgraphviz, which is then piped to dot2echarts.

go mod graph | \
    go run golang.org/x/exp/cmd/modgraphviz@latest | \
    dot2echarts -dotfile /dev/stdin -title "dot2echarts dependencies" > deps.html

Check out the dnaeon/dot2echarts repo for additional examples and information.

Written on September 26, 2026