All Projects → mstefaniuk → Graph Viz D3 Js

mstefaniuk / Graph Viz D3 Js

Licence: mit
Graphviz web D3.js renderer

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Graph Viz D3 Js

Gographviz
Parses the Graphviz DOT language in golang
Stars: ✭ 416 (+40.07%)
Mutual labels:  parse, graphviz
Kingraph
Plots family trees using JavaScript and Graphviz
Stars: ✭ 285 (-4.04%)
Mutual labels:  graphviz
PSDiscoveryProtocol
Capture and parse CDP and LLDP packets on local or remote computers
Stars: ✭ 59 (-80.13%)
Mutual labels:  parse
Go Erd
Go-ERD (Entity Relationship Diagrams) for Golang with Graphviz [WIP]
Stars: ✭ 271 (-8.75%)
Mutual labels:  graphviz
pascal-interpreter
A simple interpreter for a large subset of Pascal language written for educational purposes
Stars: ✭ 21 (-92.93%)
Mutual labels:  parse
Httparse
A push parser for the HTTP 1.x protocol in Rust.
Stars: ✭ 271 (-8.75%)
Mutual labels:  parse
vscode-graphviz
This extension provides GraphViz (dot) language support for VS Code.
Stars: ✭ 21 (-92.93%)
Mutual labels:  graphviz
Themer
Themer is a colorscheme generator and manager for your desktop.
Stars: ✭ 289 (-2.69%)
Mutual labels:  parse
Crawlertutorial
爬蟲極簡教學(fetch, parse, search, multiprocessing, API)- PTT 為例
Stars: ✭ 282 (-5.05%)
Mutual labels:  parse
Swiftpascalinterpreter
Simple Swift interpreter for the Pascal language inspired by the Let’s Build A Simple Interpreter article series.
Stars: ✭ 270 (-9.09%)
Mutual labels:  parse
Angourimath
Open-source symbolic algebra library for C# and F#. One of the most powerful in .NET
Stars: ✭ 266 (-10.44%)
Mutual labels:  parse
Asammdf
Fast Python reader and editor for ASAM MDF / MF4 (Measurement Data Format) files
Stars: ✭ 255 (-14.14%)
Mutual labels:  parse
Pubmed parser
📋 A Python Parser for PubMed Open-Access XML Subset and MEDLINE XML Dataset
Stars: ✭ 274 (-7.74%)
Mutual labels:  parse
metaparse
A handy tool to help design and parse your own language
Stars: ✭ 22 (-92.59%)
Mutual labels:  parse
Rback
RBAC in Kubernetes visualizer
Stars: ✭ 285 (-4.04%)
Mutual labels:  graphviz
php-video-url-parser
A Simple and efficient PHP Video URL Parser that provides you thumbnails and embed codes for various video streaming websites
Stars: ✭ 57 (-80.81%)
Mutual labels:  parse
Graphviz Visual Editor
A web application for interactive visual editing of Graphviz graphs described in the DOT language.
Stars: ✭ 261 (-12.12%)
Mutual labels:  graphviz
Octopus
🐙 Octopus - Internal wiki with diagrams for software and product teams
Stars: ✭ 274 (-7.74%)
Mutual labels:  graphviz
Demoinfocs Golang
High performance CS:GO demo parser for Go (demoinfo)
Stars: ✭ 288 (-3.03%)
Mutual labels:  parse
Babel Plugin Import Graphql
Enables import syntax for .graphql and .gql files
Stars: ✭ 284 (-4.38%)
Mutual labels:  parse

Graphviz dot in your browser

Bower component graphviz-d3-renderer renders Graphviz source in the browser with d3.js. Check it out on Graphviz fiddling website.

Build Status Coverage Status Forks Stars Join the chat at https://gitter.im/mstefaniuk/graph-viz-d3-js

Contents

  • dot parser with lax mode to verify Graphviz input
  • dot mode for ACE editor
  • stage data renderer with d3.js

Design

DOT parser is written in PEG.js has lax mode to parse source to the end with all errors. Graphviz is embedded in browser using viz.js. Instead of using SVG directly it uses xdot format and parses it. Data structure of the output is drawn using d3.js with animations during rendering.

Usage

To include it in your project simply use Bower:

bower install graphviz-d3-renderer --save

Note that it needs require.js to work. Before loading proper paths should be defined for renderer and its dependecies (d3.js and worker for require.js plugin):

requirejs.config({
	//By default load any module IDs from js/lib
	baseUrl: 'js',
	//except, if the module ID starts with "app",
	//load it from the js/app directory. paths
	//config is relative to the baseUrl, and
	//never includes a ".js" extension since
	//the paths config could be for a directory.
	paths: {
		d3: '/bower_components/d3/d3',
		"dot-checker": '/bower_components/graphviz-d3-renderer/dist/dot-checker',
		"layout-worker": '/bower_components/graphviz-d3-renderer/dist/layout-worker',
		worker: '/bower_components/requirejs-web-workers/src/worker',
		renderer: '/bower_components/graphviz-d3-renderer/dist/renderer'
	}
});

Then you can inject it into you app:

require(["renderer"],
  function (renderer) {

  dotSource = 'digraph xyz ...';
  // initialize svg stage
  renderer.init("#graph");

  // update stage with new dot source
  renderer.render(dotSource);
});

Now you can even zoom / drag your graph

require(["renderer"],
	function (renderer) {
		dotSource = 'digraph xyz ...';
		// initialize svg stage. Have to get a return value from renderer.init 
		//   to properly reset the image.
	    zoomFunc = renderer.init({element:"#graph", extend:[0.1, 10]});

	    // update stage with new dot source
	    renderer.render(dotSource);
	    
	    // for saving the image, 
	    $('#copy-button').on('click', function(){
		    $('#copy-div').html(renderer.getImage({reset:true, zoomFunc:zoomFunc}));
	    });	  
	    
	    // if do not need to reset the image before saving the image
	    $('#copy-button').on('click', function(){
		    $('#copy-div').html(renderer.getImage());
	    });	
});  

Roadmap

  • Test suite using Graphviz gallery examples (50% done)
  • Improve animations with path tweening and concatenation of arrow heads with arrow arcs
  • Custom viz.js compile with xdot output only to optimize size

Building and contributing

To make controlled changes you need node and grunt. When you add a new feature you must cover it with unit tests.

> grunt build test

When everything is ready you can build also dist version (takes some time).

> grunt all

License

Currently project is available on LGPL so you can use it unmodified in free or commercial projects. If you add improvements to it you must share them.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].