Skip to content

Instantly share code, notes, and snippets.

View magjac's full-sized avatar

Magnus Jacobsson magjac

  • Stockholm, Sweden
View GitHub Profile
<!DOCTYPE html>
<!-- Styles -->
<style>
#graph {
width: 49%;
float: left;
background: #FDF6E3;
}
@magjac
magjac / index.html
Created September 5, 2017 04:43
d3-timer bug in v4.10.1
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<h1>Open the console and look for messages</h1>
<script src="//unpkg.com/d3@4.10.1/build/d3.min.js"></script>
<script>
var period = 1000;
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="//d3js.org/d3.v4.js"></script>
<div></div>
<script>
var svg = d3.select("div").append("svg")
.attr("width", 300)
.attr("height", 220);
@magjac
magjac / README.md
Last active November 19, 2017 15:13

Example showing bug in d3-graphviz version 1.0.1

Growing edges start growing from the wrong position when start node shape is a polygon

Edge a -> b has the problem, while edge c -> d does not.

@magjac
magjac / .block
Last active January 7, 2018 15:16
Growing Graphviz Edges
height: 800
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="//d3js.org/d3.v5.min.js"></script>
<script src="https://unpkg.com/viz.js@1.8.1/viz.js" type="javascript/worker"></script>
<script src="https://unpkg.com/d3-graphviz@1.6.1/build/d3-graphviz.min.js"></script>
<div id="graph" style="text-align: center;"></div>
<script>
dotSrc = `
@magjac
magjac / README.md
Last active May 24, 2018 09:06
Answer to '“Maximum call stack size exceeded” rendering large dot file with d3-graphviz'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@magjac
magjac / README.md
Created June 11, 2018 05:57
Answer to '“Maximum call stack size exceeded” rendering large dot file with d3-graphviz' (using web worker)
@magjac
magjac / Untitled Document
Created July 15, 2018 16:48
Gist from yEd-Live
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--Created by yFiles for HTML 2.1.0.3-RC3-->
<graphml xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml.html/2.0/ygraphml.xsd " xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:demostyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoStyle/1.0" xmlns:bpmn="http://www.yworks.com/xml/yfiles-for-html/bpmn/2.0" xmlns:demotablestyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoTableStyle/1.0" xmlns:uml="http://www.yworks.com/yFilesHTML/demos/UMLDemoStyle/1.0" xmlns:compat="http://www.yworks.com/xml/yfiles-compat-arrows/1.0" xmlns:VuejsNodeStyle="http://www.yworks.com/demos/yfiles-vuejs-node-style/1.0" xmlns:y="http://www.yworks.com/xml/yfiles-common/3.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/3.0" xmlns:yjs="http://www.yworks.com/xml/yfiles-for-html/2.0/xaml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<key id="d0" for="node" attr.type="boolean" attr.name="Expanded" y:attr.ur