When plotting a custom label for line chart axis, on rotation of label the label's text overlaps with axis. How can one solve this issue? I tried searching documentation and found Element.transform() is to be used for rotation instead of rotate() since its depreciated, but I'm not able to make it work. Can some one help?
var lines1 = r.linechart(100, 50, 950, 470, x,
y, {
smooth : false,
symbol : 'circle',
axis : "0 0 1 1",
axisxstep: 20,
axisystep:20
}).hoverColumn(function () {
this.tags = r.set();
for (var i = 0, ii = this.y.length; i < ii; i++) {
this.tags.push(r.tag(this.x, this.y[i], this.values[i], 160, 5).insertBefore(this).attr([{ fill: "#fff" }, { fill: this.symbols[i].attr("fill") }]));
}
}, function () {
this.tags && this.tags.remove();
});
var axisItems = lines1.axis[0].text.items
for( var i = 0, l = axisItems.length; i < l; i++ ) {
var date = new Date(parseInt(axisItems[i].attr("text")));
axisItems[i].rotate(270,this.x ,this.y);
axisItems[i].attr("text", dateFormat(date, "dmmm,htt"));
}