Commit 8fcc0f363989afebb691f97c65c2df87a21f5562
1 parent
9bb60e44
treeview bug fixing
Showing
2 changed files
with
5 additions
and
6 deletions
datalets/treemap-datalet/js/buildtreemap.js
... | ... | @@ -3,12 +3,10 @@ |
3 | 3 | */ |
4 | 4 | |
5 | 5 | function build(root, place_holder) { |
6 | - var plwidth = $("#" + place_holder).width(), | |
7 | - plheight = $("#" + place_holder).height(); | |
6 | + var plwidth = $(place_holder).width(); | |
7 | + var plheight = $(place_holder).height(); | |
8 | 8 | |
9 | 9 | var margin = {top: 20, right: 0, bottom: 0, left: 0}, |
10 | - //width = 960, | |
11 | - //height = 500 - margin.top - margin.bottom, | |
12 | 10 | width = plwidth, |
13 | 11 | height = plheight - margin.top - margin.bottom, |
14 | 12 | formatNumber = d3.format(",d"), |
... | ... | @@ -28,7 +26,7 @@ function build(root, place_holder) { |
28 | 26 | .ratio(height / width * 0.5 * (1 + Math.sqrt(5))) |
29 | 27 | .round(false); |
30 | 28 | |
31 | - var svg = d3.select("#" + place_holder).append("svg") | |
29 | + var svg = d3.select(place_holder).append("svg") | |
32 | 30 | .attr("width", width + margin.left + margin.right) |
33 | 31 | .attr("height", height + margin.bottom + margin.top) |
34 | 32 | .style("margin-left", -margin.left + "px") |
... | ... |
datalets/treemap-datalet/treemap-datalet.html