{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# examples from the [mermaid site](http://knsv.github.io/mermaid)\n", "> On nbviewer right now, you should use the bookmarklet from [the nb-mermaid site](https://bollwyvl.github.io/nb-mermaid/)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "data": { "application/javascript": [ "IPython.load_extensions([\"nb-mermaid/nb-mermaid\"]);" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%javascript\n", "IPython.load_extensions([\"nb-mermaid/nb-mermaid\"]);" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "## [flowchart](http://knsv.github.io/mermaid/flowchart.html)\n", "\n", "
\n", " graph TB\n", " subgraph one\n", " a1-->a2\n", " end\n", " subgraph two\n", " b1-->b2\n", " end\n", " subgraph three\n", " c1-->c2\n", " end\n", " c1-->a2\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## [sequence diagram](http://knsv.github.io/mermaid/sequenceDiagram.html#)\n", "\n", "
\n", " sequenceDiagram\n", " Alice->>Bob: Hello Bob, how are you?\n", " alt is sick\n", " Bob->>Alice: Not so good :(\n", " else is well\n", " Bob->>Alice: Feeling fresh like a daisy\n", " end\n", " opt Extra response\n", " Bob->>Alice: Thanks for asking\n", " end\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## [gantt chart](http://knsv.github.io/mermaid/gantt.html) \n", "
\n", "gantt\n", "dateFormat YYYY-MM-DD\n", "title Adding GANTT diagram functionality to mermaid\n", "\n", "section A section\n", "Completed task :done, des1, 2014-01-06,2014-01-08\n", "Active task :active, des2, 2014-01-09, 3d\n", "Future task : des3, after des2, 5d\n", "Future task2 : des4, after des3, 5d\n", "\n", "section Critical tasks\n", "Completed task in the critical line :crit, done, 2014-01-06,24h\n", "Implement parser and jison :crit, done, after des1, 2d\n", "Create tests for parser :crit, active, 3d\n", "Future task in critical line :crit, 5d\n", "Create tests for renderer :2d\n", "Add to mermaid :1d\n", "\n", "section Documentation\n", "Describe gantt syntax :active, a1, after des1, 3d\n", "Add gantt diagram to demo page :after a1 , 20h\n", "Add another diagram to demo page :doc1, after a1 , 48h\n", "\n", "section Last section\n", "Describe gantt syntax :after doc1, 3d\n", "Add gantt diagram to demo page : 20h\n", "Add another diagram to demo page : 48h\n", "
" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.4.2" } }, "nbformat": 4, "nbformat_minor": 0 }