javascript - Zoom to region on Zoomable Treemap Bar Chart -
i've implemented nice zoomable treemap bar chart chris given, i'm having trouble making behave bit different. i'd first zoom regions , rebuild chart, allowing 1 click further each country.
i've tried modifying code below in order give layer
var continents = types.selectall('.continent') // note we're using our copied branch. .data(function (d) { return d.treemaproot.children }, function (d) { return d.data.continent }) var entercontinents = continents.enter().append('g') .attr('class', 'continent') .attr('x', function (d) { return d.value ? d.x0 : x1.bandwidth() / 2 }) .attr('width', function (d) { return d.value ? d.x1 - d.x0 : 0 }) .attr('y', 0) .attr('height', 0) .style('fill', function (d) { return color(d.parent.data.continent) }) but i'm having difficulties getting run. breaks countries within continents.
thank you.
Comments
Post a Comment