I am trying to orientate the x-axis text on the waterfall chart example http://dimplejs.org/advanced_examples_viewer.html?id=advanced_waterfall
Motivated by How to rotate x-axis text in dimple.js? in the console for the above webpage I injected:
myChart.axes[0].shapes.selectAll("text").attr("transform", "rotate(-45)");
resulting in:
as can be seen the axis rotate but their position has been translated.
My particular use case can be seen:
there are more categories and the axis text needs to be rotated to prevent overflow. How would I rotate the axis text (in my case I want -90 degrees rather then -45) and prevent the resulting position translation?
In the case of the dimplejs website example I can do
myChart.axes[0].shapes.selectAll("text")
.attr("transform", "translate(-150, 200) rotate(-90)")
to manually align the text:
On my particular chart with more categories I need to do:
myChart.axes[0].shapes.selectAll("text")
.attr("transform", "translate(-130, 140) rotate(-90)")
A nasty hack with coordinates that need to be manually changed depending on data.