<commit_before><!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="//d3js.org/d3.v4.min.js"></script>
<script src="../../node_modules/viz.js/viz.js" type="javascript/worker"></script>
<script src="../../build/d3-graphviz.js"></script>
<div id="graph" style="text-align: center;"></div>
<script>

var dotIndex = 0;
var graphviz = d3.select("#graph").graphviz()
    .transitionFactory(function () {
        return d3.transition("main")
            .ease(d3.easeLinear)
            .delay(40)
            .duration(2000);
    })
    .logEvents();

function render() {
    var dotLines = [
        'digraph  {',
        '    node [style="filled"]',
    ];
    for (i = 0; i < shapes.length; i++) {
        if (dotIndex % 2 == 0) {
            shape = shapes[(dotIndex / 2) % shapes.length];
        } else {
            shape = shapes[i % shapes.length];
        }
        dotLines.push('    ' +  i + ' [label="' + shape + '" fillcolor="' + colors[i] +'" shape="' + shape + '"]');
    }
    dotLines = dotLines.concat([
        '   0 -> 1 -> 2 -> 3',
        '   4 -> 5 -> 6 -> 7',
        '   8 -> 9 -> 10 -> 11',
        '   12 -> 13 -> 14 -> 15',
        '   16 -> 17 -> 18 -> 19',
    ]);
    dotLines.push('}');
    var dot = dotLines.join('');
    graphviz
        .renderDot(dot)
        .on("end", function () {
            dotIndex += 1;
            render();
        });
}

var shapes = [
//    "box",
    "polygon",
    "ellipse",
//    "oval",
    "circle",
    "point",
    "egg",
    "triangle",
    "diamond",
    "trapezium",
    "parallelogram",
    "house",
    "pentagon",
    "hexagon",
    "septagon",
    "octagon",
    "invtriangle",
    "invtrapezium",
    "invhouse",
//    "rect",
//    "rectangle",
    "square",
    "star",
    "cds",
];

var colors = d3.schemeCategory20;

render();

</script><commit_msg>Start render on initEnd event in shape tweening demo<commit_after><!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="//d3js.org/d3.v4.min.js"></script>
<script src="../../node_modules/viz.js/viz.js" type="javascript/worker"></script>
<script src="../../build/d3-graphviz.js"></script>
<div id="graph" style="text-align: center;"></div>
<script>

var dotIndex = 0;
var graphviz = d3.select("#graph").graphviz()
    .transitionFactory(function () {
        return d3.transition("main")
            .ease(d3.easeLinear)
            .delay(40)
            .duration(2000);
    })
    .logEvents()
    .on("initEnd", render);

function render() {
    var dotLines = [
        'digraph  {',
        '    node [style="filled"]',
    ];
    for (i = 0; i < shapes.length; i++) {
        if (dotIndex % 2 == 0) {
            shape = shapes[(dotIndex / 2) % shapes.length];
        } else {
            shape = shapes[i % shapes.length];
        }
        dotLines.push('    ' +  i + ' [label="' + shape + '" fillcolor="' + colors[i] +'" shape="' + shape + '"]');
    }
    dotLines = dotLines.concat([
        '   0 -> 1 -> 2 -> 3',
        '   4 -> 5 -> 6 -> 7',
        '   8 -> 9 -> 10 -> 11',
        '   12 -> 13 -> 14 -> 15',
        '   16 -> 17 -> 18 -> 19',
    ]);
    dotLines.push('}');
    var dot = dotLines.join('');
    graphviz
        .renderDot(dot)
        .on("end", function () {
            dotIndex += 1;
            render();
        });
}

var shapes = [
//    "box",
    "polygon",
    "ellipse",
//    "oval",
    "circle",
    "point",
    "egg",
    "triangle",
    "diamond",
    "trapezium",
    "parallelogram",
    "house",
    "pentagon",
    "hexagon",
    "septagon",
    "octagon",
    "invtriangle",
    "invtrapezium",
    "invhouse",
//    "rect",
//    "rectangle",
    "square",
    "star",
    "cds",
];

var colors = d3.schemeCategory20;

</script>
{'fraction_non_alphanumeric': 0.21104853848216681, 'fraction_numerical': 0.028425851434700992, 'mean_word_length': 1.8604294478527608, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1184596', 'n_tokens_mistral': 1401, 'n_tokens_neox': 1304, 'n_words': 262}