Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/atomita/angular-viz


https://github.com/atomita/angular-viz

Last synced: 11 days ago
JSON representation

Awesome Lists containing this project

README

        

angular-viz.js
===========

This is a module for using [Viz.js](https://github.com/mdaines/viz.js/) on AngularJS.

## example

```coffee
# app.coffee

app = angular.module("app", ["atVizJs"])

# using provider.
app.config(["vizJsProvider", (provider)->
# set common option.
provider.option(
format: "svg"
engine: "dot"
)

# enable language-dot directive.
provider.enableLanguageDirective()
])

# using on controller.
app.controller("ctrl", ["$scope", "$sce", "vizJs", ($scope, $sce, viz)->
$scope.svg = $sce.trustAsHtml(viz.render("digraph { a -> b; }"))
])
```

```html













digraph { c -> d; }



digraph { e -> f; }






digraph { i -> j; }

```

Note: If you want to use the rave.js, please use the ones that adopted [this change](https://github.com/RaveJS/rave/pull/70).