Merge branch 'experiment/graph-explorer-generation' into develop

This commit is contained in:
Sergio Martínez Portela 2022-08-19 19:39:42 +02:00
commit ef1d71dc2f

View File

@ -7,6 +7,12 @@
<script type='text/javascript'> <script type='text/javascript'>
var NODE_GRAPH=<!-- REPLACE_THIS_WITH_GRAPH -->; var NODE_GRAPH=<!-- REPLACE_THIS_WITH_GRAPH -->;
</script> </script>
<style>
text {
font-family: sans-serif;
font-size: 10px;
}
</style>
<script> <script>
// Copyright 2021 Observable, Inc. // Copyright 2021 Observable, Inc.
// Released under the ISC license. // Released under the ISC license.
@ -80,15 +86,15 @@ function ForceGraph({
// Add arrowheads // Add arrowheads
svg.append('defs').append('marker') svg.append('defs').append('marker')
.attr('id', 'arrowhead') .attr('id', 'arrowhead')
.attr('viewBox', '-0 -5 10 10') .attr('viewBox', '-0 -2.5 5 5')
.attr('refX', 13) .attr('refX', 10)
.attr('refY', 0) .attr('refY', 0)
.attr('orient', 'auto') .attr('orient', 'auto')
.attr('markerWidth', 13) .attr('markerWidth', 7)
.attr('markerHeight', 13) .attr('markerHeight', 7)
.attr('xoverflow', 'visible') .attr('xoverflow', 'visible')
.append('svg:path') .append('svg:path')
.attr('d', 'M 0,-5 L 10 ,0 L 0,5') .attr('d', 'M 0,-2.5 L 5 ,0 L 0,2.5')
.attr('fill', '#999') .attr('fill', '#999')
.style('stroke','none'); .style('stroke','none');
@ -263,6 +269,8 @@ function ForceGraph({
linkLabel: (d) => { const e = edges[d.index]; if (e.relation) { return e.relation; } else { return ''; } }, linkLabel: (d) => { const e = edges[d.index]; if (e.relation) { return e.relation; } else { return ''; } },
}); });
holder.appendChild(chart); holder.appendChild(chart);
chart.height = '100vh';
chart.width = '100vw';
</script> </script>
</body> </body>
</html> </html>