Commit eb8e97fc authored by Sylvain Schmitz's avatar Sylvain Schmitz

compute number of fragments

parent 0bacf3d4
......@@ -11,9 +11,9 @@
<property name="lib.dir" value="../../lib"/>
<target name="all" depends="matrix"/>
<!-- extract benchmark data -->
<target name="matrix" depends="saxon">
<filter token="benchmark" value="${xml}"/>
<mkdir dir="${target.dir}/${xml}"/>
<xslt style="matrix.xsl"
in="../../benchmark/${xml}.xml"
......@@ -22,7 +22,28 @@
<pathelement path="${lib.dir}/saxon9he.jar"/>
</classpath>
</xslt>
<copy file="index.html" todir="${target.dir}/${xml}" filtering="true"/>
<!-- get the number of fragments -->
<resourcecount property="fragments">
<tokens>
<concat>
<filterchain>
<tokenfilter>
<linetokenizer/>
</tokenfilter>
</filterchain>
<fileset file="fragments.csv"/>
</concat>
</tokens>
</resourcecount>
<echo message="${fragments}"/>
<copy file="index.html" todir="${target.dir}/${xml}">
<filterchain>
<replacetokens>
<token key="FRAGMENTS" value="${fragments}"/>
<token key="BENCHMARK" value="${xml}"/>
</replacetokens>
</filterchain>
</copy>
<move file="matrix.json" todir="${target.dir}/${xml}"/>
<move file="fragments.csv" todir="${target.dir}/${xml}"/>
</target>
......
......@@ -47,7 +47,7 @@ path.inactive, #circle:hover path.fade {
</style>
<h1>Outflows in @benchmark@</h1>
<h1>Outflows in @BENCHMARK@</h1>
<p>Links represent XPath entries belonging to one fragment but not the
other. Thicker links represent larger flows. Links are directed;
......@@ -66,9 +66,9 @@ path.inactive, #circle:hover path.fade {
</select>
</aside>
<script>
var N = 9;
var N = @FRAGMENTS@ - 1;
var margin = {top: 80, right: 0, bottom: 10, left: 80},
matrixh = matrixw = 15*N;
matrixh = matrixw = 16*N;
var formatPercent = d3.format(".1%");
......@@ -400,7 +400,7 @@ function chordgraph(fragments, matrix, maxentries) {
// Add a text label.
var groupText = group.append("text")
.attr("x", 6)
.attr("dy", 15);
.attr("dy", 16);
groupText.append("textPath")
.attr("xlink:href", function(d, i) { return "#group" + i; })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment