Use translate instead of dx for compatibility with Batik

parent c94bf341
......@@ -323,11 +323,13 @@ c3_chart_internal_fn.rotateTickText = function (axis, transition, rotate) {
return 'middle';
}
});
// Here we use translate for <text> instead of dx for <tspan>
// because Batik rasterizer ignores dx attribute
var yOffset = -this.xForRotatedTickText(rotate);
transition.selectAll('.tick text')
.attr("y", this.yForRotatedTickText(rotate))
.attr("transform", "rotate(" + rotate + ")")
.selectAll('tspan')
.attr('dx', this.xForRotatedTickText(rotate));
.attr("transform", "translate(0 "+ yOffset +") rotate(" + rotate + ")");
};
c3_chart_internal_fn.getMaxTickWidth = function (id) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment