Browse Source

Fix axis z-index

pull/232/merge
Masayuki Tanaka 11 years ago
parent
commit
b556645bfc
  1. 68
      c3.js

68
c3.js

@ -2522,40 +2522,6 @@
grid.append('g').attr('class', CLASS.ygridLines); grid.append('g').attr('class', CLASS.ygridLines);
} }
// Add Axis
if (__axis_x_show) {
main.append("g")
.attr("class", CLASS.axisX)
.attr("clip-path", clipPathForXAxis)
.attr("transform", translate.x)
.append("text")
.attr("class", CLASS.axisXLabel)
.attr("transform", __axis_rotated ? "rotate(-90)" : "")
.style("text-anchor", textAnchorForXAxisLabel);
}
if (__axis_y_show) {
main.append("g")
.attr("class", CLASS.axisY)
.attr("clip-path", clipPathForYAxis)
.attr("transform", translate.y)
.append("text")
.attr("class", CLASS.axisYLabel)
.attr("transform", __axis_rotated ? "" : "rotate(-90)")
.style("text-anchor", textAnchorForYAxisLabel);
}
if (__axis_y2_show) {
main.append("g")
.attr("class", CLASS.axisY2)
// clip-path?
.attr("transform", translate.y2)
.append("text")
.attr("class", CLASS.axisY2Label)
.attr("transform", __axis_rotated ? "" : "rotate(-90)")
.style("text-anchor", textAnchorForY2AxisLabel);
}
// Regions // Regions
main.append('g') main.append('g')
.attr("clip-path", clipPath) .attr("clip-path", clipPath)
@ -2608,6 +2574,40 @@
brush.extent(typeof __axis_x_default !== 'function' ? __axis_x_default : __axis_x_default(getXDomain())); brush.extent(typeof __axis_x_default !== 'function' ? __axis_x_default : __axis_x_default(getXDomain()));
} }
// Add Axis
if (__axis_x_show) {
main.append("g")
.attr("class", CLASS.axisX)
.attr("clip-path", clipPathForXAxis)
.attr("transform", translate.x)
.append("text")
.attr("class", CLASS.axisXLabel)
.attr("transform", __axis_rotated ? "rotate(-90)" : "")
.style("text-anchor", textAnchorForXAxisLabel);
}
if (__axis_y_show) {
main.append("g")
.attr("class", CLASS.axisY)
.attr("clip-path", clipPathForYAxis)
.attr("transform", translate.y)
.append("text")
.attr("class", CLASS.axisYLabel)
.attr("transform", __axis_rotated ? "" : "rotate(-90)")
.style("text-anchor", textAnchorForYAxisLabel);
}
if (__axis_y2_show) {
main.append("g")
.attr("class", CLASS.axisY2)
// clip-path?
.attr("transform", translate.y2)
.append("text")
.attr("class", CLASS.axisY2Label)
.attr("transform", __axis_rotated ? "" : "rotate(-90)")
.style("text-anchor", textAnchorForY2AxisLabel);
}
/*-- Context Region --*/ /*-- Context Region --*/
// Define g for chart area // Define g for chart area

Loading…
Cancel
Save