Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Smetannikov committed Dec 12, 2019
1 parent 188e496 commit bd4f050
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# JBZoo Mermaid-PHP [![Build Status](https://travis-ci.org/JBZoo/mermaid-php.svg?branch=master)](https://travis-ci.org/JBZoo/mermaid-php) [![Coverage Status](https://coveralls.io/repos/github/JBZoo/Mermaid-PHP/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/Mermaid-PHP?branch=master)
# JBZoo Mermaid-PHP [![Latest Stable Version](https://poser.pugx.org/JBZoo/Mermaid-PHP/v/stable)](https://packagist.org/packages/JBZoo/Mermaid-PHP) [![License](https://poser.pugx.org/JBZoo/Mermaid-PHP/license)](https://packagist.org/packages/JBZoo/Mermaid-PHP) [![Build Status](https://travis-ci.org/JBZoo/Mermaid-PHP.svg?branch=master)](https://travis-ci.org/JBZoo/Mermaid-PHP) [![Coverage Status](https://coveralls.io/repos/github/JBZoo/Mermaid-PHP/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/Mermaid-PHP?branch=master)

### Usage

Expand All @@ -9,6 +9,8 @@ use JBZoo\MermaidPHP\Graph;
use JBZoo\MermaidPHP\Link;
use JBZoo\MermaidPHP\Node;

require_once './vendor/autoload.php';

$graph = (new Graph())
->addNode($nodeA = new Node('A', 'Hard edge', Node::SQUARE))
->addNode($nodeB = new Node('B', 'Round edge', Node::ROUND))
Expand All @@ -21,8 +23,8 @@ $graph = (new Graph())
->addLink(new Link($nodeC, $nodeE, 'Two'))
->addStyle('linkStyle default interpolate basis');

echo $graph; // Get result as string
$graph->renderHtml(true, '8.4.3'); // Get result as HTML code for debugging
echo $graph; // Get result as string (or $graph->__toString())
$htmlCode = $graph->renderHtml(true, '8.4.3'); // Get result as HTML code for debugging
```

### Result
Expand Down

0 comments on commit bd4f050

Please sign in to comment.