Browse Source

Fix animation for subchart

pull/1/head
Masayuki Tanaka 12 years ago committed by masayuki
parent
commit
ac81aeefe2
  1. 5
      c3.js

5
c3.js

@ -1062,13 +1062,12 @@
.attr("x", barX).attr("y", barY).attr("width", barW).attr("height", barH) .attr("x", barX).attr("y", barY).attr("width", barW).attr("height", barH)
contextBar.enter().append('rect') contextBar.enter().append('rect')
.attr("class", classBar) .attr("class", classBar)
.attr("x", barX).attr("y", height2).attr("width", barW).attr("height", 0) .attr("x", barX).attr("y", barY).attr("width", barW).attr("height", barH)
.style("opacity", 0) .style("opacity", 0)
.transition() .transition()
.attr('y', barY).attr('height', barH)
.style('opacity', 1) .style('opacity', 1)
contextBar.exit().transition() contextBar.exit().transition()
.attr('y', height2).attr('height', 0).style('opacity', 0) .style('opacity', 0)
.remove() .remove()
} }

Loading…
Cancel
Save