@@ -314,9 +314,8 @@ function seturl(){
if (!htmlNode) throw "Missing html node";
if (!data) throw "Missing data";
- //svg = d3.select("#chart").append("svg")
htmlNode.append("rect").attr("x",0).attr("y",0).attr("width","100%").attr("height","100%").attr("fill","white")
- width = 1020
+ width = (opts.width) ? opts.width - margin.left - margin.right : 1020
height = 500
margin = {
top: 10,
@@ -1941,7 +1941,9 @@ function graphRender(wrapNode, props) {
var graphData = { nodes: _nodes, links: _links };
- var graf = renderGraph(svgNode, graphData)
+ var graf = renderGraph(svgNode, graphData, {
+ width: jQuery(wrapNode).width()
+ })
graf.on('click', (event) => {
if(DBG)console.log('event', event)
// event = {