-
Bug
-
Resolution: Duplicate
-
P4
-
7u45
-
Windows 7, JRE 1.7.0_45, JavaFx 2.2.45-b18
In creating a bar chart, the axis API has the method setTickLabelRotation() to set the orientation of labels on the bars. In my attempt to use this on the x-axis in a vertical bar chart, this call seems to be ignored:
xAxis.setTickLabelRotation(90);
Its been observed that the orientation of the bar labels along the x-axis is determined entirely by the size of the display, and can change from horizontal to vertical or vice-a-versa as the display is re-sized. The value set by the call to setTickLabelRotation() seems to be ignored.
Moreover, depending upon the display size, the labels may get rendered horizontally, but only for alternate bars. This is a problem in my particular situation, which is what prompted me to use setTickLabelRotation().
I used the example code from http://docs.oracle.com/javafx/2/charts/bar-chart.htm to recreate the case I describe. Even this tutorial suggests using setTickLabelRotation() to set the orientation of of the tick labels (except its use is shown in a horizontal bar chart, as opposed to the vertical bar chart that is of interest to me).
There ought to be a way to ensure that the bar labels are always displayed, and enforcing the rotation may be one way to do so.
xAxis.setTickLabelRotation(90);
Its been observed that the orientation of the bar labels along the x-axis is determined entirely by the size of the display, and can change from horizontal to vertical or vice-a-versa as the display is re-sized. The value set by the call to setTickLabelRotation() seems to be ignored.
Moreover, depending upon the display size, the labels may get rendered horizontally, but only for alternate bars. This is a problem in my particular situation, which is what prompted me to use setTickLabelRotation().
I used the example code from http://docs.oracle.com/javafx/2/charts/bar-chart.htm to recreate the case I describe. Even this tutorial suggests using setTickLabelRotation() to set the orientation of of the tick labels (except its use is shown in a horizontal bar chart, as opposed to the vertical bar chart that is of interest to me).
There ought to be a way to ensure that the bar labels are always displayed, and enforcing the rotation may be one way to do so.