1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-30 01:03:16 +00:00

Fix problem with refreshing D3 plugin

Fixes #217
This commit is contained in:
Jermolene 2014-03-11 11:12:56 +00:00
parent fe33906ef0
commit aec618793f
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ BarWidget.prototype.createChart = function(parent,nextSibling) {
.tickPadding(6) .tickPadding(6)
.orient("bottom"); .orient("bottom");
// Create SVG element // 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("viewBox", "0 0 960 500")
.attr("preserveAspectRatio", "xMinYMin meet") .attr("preserveAspectRatio", "xMinYMin meet")
.attr("width", width + margin.left + margin.right) .attr("width", width + margin.left + margin.right)

View File

@ -62,7 +62,7 @@ CloudWidget.prototype.createChart = function(parent,nextSibling) {
}); });
} }
// Create the svg element // 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("width", 600)
.attr("height", 400); .attr("height", 400);
// Create the main group // Create the main group