updated readme.
This commit is contained in:
parent
cf08847e69
commit
6ca1ad8f61
2 changed files with 19 additions and 6 deletions
25
README.md
25
README.md
|
|
@ -1,15 +1,23 @@
|
||||||
# d3-dot-graph
|
# d3-dot-graph
|
||||||
|
|
||||||
This module provides [D3js](d3js) compatible library to parse and load files in graphviz [.dot](dot) (graph description language) format.
|
This module provides [D3js][d3js] compatible library to parse and load files in graphviz [DOT (.dot)][dot] (graph description language) format.
|
||||||
|
|
||||||
## why?
|
## why?
|
||||||
While working on Java Platform Module System migration projects coming with Java 9 (as of August 2017), I am havily using jdeps which is generating DOT (.dot) files. These are usually visualized using dot tool of graphviz.
|
While working on [Java Platform Module System][jpms] migration projects coming with Java 9 (as of August 2017), I am havily using [jdeps][jdeps] which is generating [DOT (.dot)][dot] files. These are usually visualized using dot tool of [graphviz][graphviz].
|
||||||
|
|
||||||
In most cases it is enough, but I wanted to have nicer d3js visualization and interaction.
|
In most cases it is enough, but I wanted to have nicer d3js visualization and interaction.
|
||||||
|
|
||||||
|
## example
|
||||||
|
|
||||||
|
See sample `summary.dot` file generated by [jdeps][jdeps] visualized using D3js][d3js] here: [index.html][example]
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Inspired by [Mike Bostosck][mbostock]
|
||||||
|
|
||||||
## usage
|
## usage
|
||||||
|
|
||||||
Usage is identical with well known ´d3.json([url], [callback])´ or ´d3.csv([url], [callback])´.
|
Usage is identical with well known `d3.json([url], [callback])` or `d3.csv([url], [callback])`.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.jsdelivr.net/gh/gmamaladze/d3-dot-graph@1.0.0/build/d3-dot-graph.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/gh/gmamaladze/d3-dot-graph@1.0.0/build/d3-dot-graph.min.js"></script>
|
||||||
|
|
@ -29,11 +37,11 @@ d3.dot("/path/to/graph.dot", function(error, graph) {
|
||||||
|
|
||||||
## parser
|
## parser
|
||||||
|
|
||||||
The parser was generated using [PEG.js](pegjs). The grammer is taken from here [cpettitt/graphlib-dot](https://github.com/cpettitt/graphlib-dot). Thanks to Chris Pettitt.
|
The parser was generated using [PEG.js][pegjs]. The grammer is taken from here [cpettitt/graphlib-dot](https://github.com/cpettitt/graphlib-dot). Thanks to Chris Pettitt.
|
||||||
|
|
||||||
You can also use parser independently from loader and converter.
|
You can also use parser independently from loader and converter.
|
||||||
|
|
||||||
# build
|
## build
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm install #install dependencies and build
|
npm install #install dependencies and build
|
||||||
|
|
@ -47,3 +55,8 @@ rollup -c -w (rollup --config --watch) #very convenient rolls the whenever sourc
|
||||||
[d3js]: https://www.d3js.org
|
[d3js]: https://www.d3js.org
|
||||||
[dot]: https://en.wikipedia.org/wiki/DOT_(graph_description_language)
|
[dot]: https://en.wikipedia.org/wiki/DOT_(graph_description_language)
|
||||||
[pegjs]: https://pegjs.org
|
[pegjs]: https://pegjs.org
|
||||||
|
[jpms]: http://openjdk.java.net/projects/jigsaw/spec/sotms
|
||||||
|
[jdeps]: https://docs.oracle.com/javase/9/tools/jdeps.htm
|
||||||
|
[graphviz]: http://www.graphviz.org
|
||||||
|
[mbostosck]: http://bl.ocks.org/mbostock/1153292
|
||||||
|
[example]: https://cdn.rawgit.com/gmamaladze/d3-dot-graph/cf08847e/example/index.html
|
||||||
|
|
|
||||||
BIN
doc/digraph.png
Normal file
BIN
doc/digraph.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
Loading…
Add table
Reference in a new issue