diff --git a/plugins/tiddlywiki/d3/barwidget.js b/plugins/tiddlywiki/d3/barwidget.js index e6562a086..997bc06f3 100644 --- a/plugins/tiddlywiki/d3/barwidget.js +++ b/plugins/tiddlywiki/d3/barwidget.js @@ -85,7 +85,7 @@ BarWidget.prototype.createChart = function(parent,nextSibling) { .tickPadding(6) .orient("bottom"); // Create SVG element - var svgElement = d3.select(parent).insert("svg",nextSibling) + var svgElement = d3.select(parent).insert("svg",function() {return nextSibling;}) .attr("viewBox", "0 0 960 500") .attr("preserveAspectRatio", "xMinYMin meet") .attr("width", width + margin.left + margin.right) diff --git a/plugins/tiddlywiki/d3/cloudwidget.js b/plugins/tiddlywiki/d3/cloudwidget.js index 6726a9252..149747d3e 100644 --- a/plugins/tiddlywiki/d3/cloudwidget.js +++ b/plugins/tiddlywiki/d3/cloudwidget.js @@ -62,7 +62,7 @@ CloudWidget.prototype.createChart = function(parent,nextSibling) { }); } // Create the svg element - var svgElement = d3.select(parent).insert("svg",nextSibling) + var svgElement = d3.select(parent).insert("svg",function() {return nextSibling;}) .attr("width", 600) .attr("height", 400); // Create the main group