Skip to content
Snippets Groups Projects
Commit fbc74086 authored by Tim Molter's avatar Tim Molter
Browse files

remove rotating Y-Axis tick labels

parent aaff851c
No related branches found
No related tags found
No related merge requests found
...@@ -124,7 +124,6 @@ public class StyleManager { ...@@ -124,7 +124,6 @@ public class StyleManager {
private TextAlignment xAxisLabelAlignment = TextAlignment.Centre; private TextAlignment xAxisLabelAlignment = TextAlignment.Centre;
private TextAlignment yAxisLabelAlignment = TextAlignment.Left; private TextAlignment yAxisLabelAlignment = TextAlignment.Left;
private int xAxisLabelRotation = 0; private int xAxisLabelRotation = 0;
private int yAxisLabelRotation = 0;
// Chart Plot Area /////////////////////////////// // Chart Plot Area ///////////////////////////////
private boolean isPlotGridLinesVisible; private boolean isPlotGridLinesVisible;
...@@ -918,16 +917,6 @@ public class StyleManager { ...@@ -918,16 +917,6 @@ public class StyleManager {
this.xAxisLabelRotation = xAxisLabelRotation; this.xAxisLabelRotation = xAxisLabelRotation;
} }
public int getYAxisLabelRotation() {
return yAxisLabelRotation;
}
public void setYAxisLabelRotation(int yAxisLabelRotation) {
this.yAxisLabelRotation = yAxisLabelRotation;
}
// Chart Plot Area /////////////////////////////// // Chart Plot Area ///////////////////////////////
/** /**
......
...@@ -248,6 +248,9 @@ public class Axis implements ChartPart { ...@@ -248,6 +248,9 @@ public class Axis implements ChartPart {
} }
/** /**
* The vertical Y-Axis is drawn first, but to know the lower bounds of it, we need to know how high the X-Axis paint zone is going to be. Since the tick labels could be rotated, we need to actually
* determine the tick labels first to get an idea of how tall thew X-Axis tick labels will be.
*
* @return * @return
*/ */
private double getXAxisHeightHint(double workingSpace) { private double getXAxisHeightHint(double workingSpace) {
......
...@@ -89,9 +89,7 @@ public class AxisTickLabels implements ChartPart { ...@@ -89,9 +89,7 @@ public class AxisTickLabels implements ChartPart {
for (Double tickLocation : axisLabelTextLayouts.keySet()) { for (Double tickLocation : axisLabelTextLayouts.keySet()) {
TextLayout axisLabelTextLayout = axisLabelTextLayouts.get(tickLocation); TextLayout axisLabelTextLayout = axisLabelTextLayouts.get(tickLocation);
AffineTransform rot = Shape shape = axisLabelTextLayout.getOutline(null);
getChartPainter().getStyleManager().getYAxisLabelRotation() == 0 ? null : AffineTransform.getRotateInstance(-Math.toRadians(getChartPainter().getStyleManager().getYAxisLabelRotation()));
Shape shape = axisLabelTextLayout.getOutline(rot);
Rectangle2D tickLabelBounds = shape.getBounds(); Rectangle2D tickLabelBounds = shape.getBounds();
double flippedTickLocation = yOffset + height - tickLocation; double flippedTickLocation = yOffset + height - tickLocation;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment