Browse Source

Fix region when rotated

pull/1/head
Masayuki Tanaka 12 years ago committed by masayuki
parent
commit
2ad6646b80
  1. 10
      c3.js

10
c3.js

@ -803,10 +803,6 @@
.data(__regions) .data(__regions)
.enter().append('rect') .enter().append('rect')
.attr('class', function(d,i){ return 'region region-' + i }) .attr('class', function(d,i){ return 'region region-' + i })
.attr("x", regionStart)
.attr("y", margin.top)
.attr("width", regionWidth)
.attr("height", height)
} }
// Define g for chart area // Define g for chart area
@ -1253,8 +1249,10 @@
.attr("width", __axis_rotated ? width : rectW) .attr("width", __axis_rotated ? width : rectW)
.attr("height", __axis_rotated ? rectW : height) .attr("height", __axis_rotated ? rectW : height)
main.selectAll('rect.region') main.selectAll('rect.region')
.attr("x", regionStart) .attr("x", __axis_rotated ? 0 : regionStart)
.attr("width", regionWidth) .attr("y", __axis_rotated ? regionStart : margin.top)
.attr("width", __axis_rotated ? width : regionWidth)
.attr("height", __axis_rotated ? regionWidth : height)
// TODO: enter/exti section for data add/remove // TODO: enter/exti section for data add/remove
} }

Loading…
Cancel
Save