Browse Source

Fix axis label when rotated

pull/66/head
Masayuki Tanaka 11 years ago
parent
commit
acf5300b1d
  1. 4
      c3.js
  2. 4
      c3.min.js

4
c3.js

@ -1774,7 +1774,7 @@
.attr("class", "-axis-x-label") .attr("class", "-axis-x-label")
.attr("dy", dyForXAxisLabel) .attr("dy", dyForXAxisLabel)
.style("text-anchor", textAnchorForXAxisLabel) .style("text-anchor", textAnchorForXAxisLabel)
.text(textForXAxisLabel); .text(__axis_rotated ? textForYAxisLabel : textForXAxisLabel);
main.append("g") main.append("g")
.attr("class", "y axis") .attr("class", "y axis")
.attr("clip-path", __axis_rotated ? "url(" + document.URL + "#yaxis-clip)" : "") .attr("clip-path", __axis_rotated ? "url(" + document.URL + "#yaxis-clip)" : "")
@ -1783,7 +1783,7 @@
.attr("transform", "rotate(-90)") .attr("transform", "rotate(-90)")
.attr("dx", dxForYAxisLabel) .attr("dx", dxForYAxisLabel)
.style("text-anchor", textAnchorForYAxisLabel) .style("text-anchor", textAnchorForYAxisLabel)
.text(textForYAxisLabel); .text(__axis_rotated ? textForXAxisLabel : textForYAxisLabel);
if (__axis_y2_show) { if (__axis_y2_show) {
main.append("g") main.append("g")

4
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save