How to embed DAGitty in your own webpage
Step 2: Include a "pre"-element in your page that has the "dagitty" class. Inside this element, include the DAGitty model code of the desired graph. Instead of a "pre" you may also try a regular "div" with "white-space: pre" but I had problems with that in Internet Explorer.
I 1 @0.423,0.755
X E @-1.193,1.639
Y O @1.053,1.639
X I Y
Step 3: Run the function "DAGitty.setup()" after the document has loaded.
- Example 1 — just shows how to embed a DAG
Also check out the more complex examples linked under "Tutorials" from the front page.