<commit_before><%--
  Created by IntelliJ IDEA.
  User: ilinca
  Date: 03/01/2017
  Time: 14:19
  To change this template use File | Settings | File Templates.
--%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>

<script type="text/javascript" src="${baseUrl}/js/vendor/venn.js?v=${version}"></script>
<script src="${baseUrl}/orthology.jsonp?mpId=MP:0005385"></script>



<div id="${param.divId}">

    <script>
        var chart = venn.VennDiagram()
            .width(500)
            .height(500);
        var div = d3.select("#${param.divId}").datum(${param.currentSet}).call(chart);

        var tooltip = d3.select("body").append("div")
            .attr("class", "venntooltip");

        div.selectAll("path")
            .style("stroke-opacity", 0)
            .style("stroke", "#fff")
            .style("stroke-width", 3)

        div.selectAll("g")
            .on("mouseover", function(d, i) {
                // sort all the areas relative to the current item
                venn.sortAreas(div, d);

                // Display a tooltip with the current size
                tooltip.transition().duration(400).style("opacity", .9);
                tooltip.text(d.size + " genes");

                // highlight the current path
                var selection = d3.select(this).transition("tooltip").duration(400);
                selection.select("path")
                    .style("fill-opacity", d.${param.currentSet}.length == 1 ? .4 : .1)
                    .style("stroke-opacity", 1);
            })

            .on("mousemove", function() {
                tooltip.style("left", (d3.event.pageX) + "px")
                    .style("top", (d3.event.pageY - 28) + "px");
            })

            .on("mouseout", function(d, i) {
                tooltip.transition().duration(400).style("opacity", 0);
                var selection = d3.select(this).transition("tooltip").duration(400);
                selection.select("path")
                    .style("fill-opacity", d.${param.currentSet}.length == 1 ? .25 : .0)
                    .style("stroke-opacity", 0);
            });

    </script>
</div>



<commit_msg>Smaller svg size for venn diagram<commit_after><%--
  Created by IntelliJ IDEA.
  User: ilinca
  Date: 03/01/2017
  Time: 14:19
  To change this template use File | Settings | File Templates.
--%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>

<script type="text/javascript" src="${baseUrl}/js/vendor/venn.js?v=${version}"></script>
<script src="${baseUrl}/orthology.jsonp?mpId=MP:0005385"></script>



<div id="${param.divId}">

    <script>
        var chart = venn.VennDiagram()
            .width(400)
            .height(400);
        var div = d3.select("#${param.divId}").datum(${param.currentSet}).call(chart);

        var tooltip = d3.select("body").append("div")
            .attr("class", "venntooltip");

        div.selectAll("path")
            .style("stroke-opacity", 0)
            .style("stroke", "#fff")
            .style("stroke-width", 3)

        div.selectAll("g")
            .on("mouseover", function(d, i) {
                // sort all the areas relative to the current item
                venn.sortAreas(div, d);

                // Display a tooltip with the current size
                tooltip.transition().duration(400).style("opacity", .9);
                tooltip.text(d.size + " genes");

                // highlight the current path
                var selection = d3.select(this).transition("tooltip").duration(400);
                selection.select("path")
                    .style("fill-opacity", d.${param.currentSet}.length == 1 ? .4 : .1)
                    .style("stroke-opacity", 1);
            })

            .on("mousemove", function() {
                tooltip.style("left", (d3.event.pageX) + "px")
                    .style("top", (d3.event.pageY - 28) + "px");
            })

            .on("mouseout", function(d, i) {
                tooltip.transition().duration(400).style("opacity", 0);
                var selection = d3.select(this).transition("tooltip").duration(400);
                selection.select("path")
                    .style("fill-opacity", d.${param.currentSet}.length == 1 ? .25 : .0)
                    .style("stroke-opacity", 0);
            });

    </script>
</div>




{'fraction_non_alphanumeric': 0.18066491688538933, 'fraction_numerical': 0.02537182852143482, 'mean_word_length': 1.9427284427284428, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '7056794', 'n_tokens_mistral': 1511, 'n_tokens_neox': 1349, 'n_words': 255}