From a94ba1f3e8d973417a01954fe6ef3c7854f1dec0 Mon Sep 17 00:00:00 2001 From: Masayuki Tanaka Date: Wed, 5 Jun 2013 16:40:24 +0900 Subject: [PATCH] Fix region update --- c3.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/c3.js b/c3.js index 8b114e3..cb13c5d 100644 --- a/c3.js +++ b/c3.js @@ -1248,22 +1248,13 @@ // rect for regions mainRegion = main.select('.regions').selectAll('rect.region') .data(__regions) - mainRegion - .attr('class', classRegion) - .transition().duration(withTransition ? 250 : 0) - .attr("x", __axis_rotated ? 0 : regionStart) - .attr("y", __axis_rotated ? regionStart : margin.top) - .attr("width", __axis_rotated ? width : regionWidth) - .attr("height", __axis_rotated ? regionWidth : height) mainRegion.enter().append('rect') + mainRegion .attr('class', classRegion) .attr("x", __axis_rotated ? 0 : regionStart) .attr("y", __axis_rotated ? regionStart : margin.top) .attr("width", __axis_rotated ? width : regionWidth) .attr("height", __axis_rotated ? regionWidth : height) - .attr("opacity", 0) - .transition().duration(withTransition ? 250 : 0) - .attr("opacity", 1) mainRegion.exit().transition().duration(withTransition ? 250 : 0) .attr("opacity", 0) .remove()