diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Legend.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Legend.java index 81e02efa7f3ee86ec827224c4a32dab1a6c00bcb..1770cea61e780d61a7ede7e350584d229d9adf43 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Legend.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Legend.java @@ -124,7 +124,7 @@ public class Legend implements ChartPart { switch (chart.getStyleManager().getLegendPosition()) { case OutsideW: xOffset = chart.getWidth() - legendBoxWidth - chart.getStyleManager().getChartPadding(); - yOffset = (int) ((chart.getHeight() - legendBoxHeight) / 2.0 + chart.getChartTitle().getSizeHint()); + yOffset = (int) (chart.getPlot().getBounds().getY() + (chart.getPlot().getBounds().getHeight() - legendBoxHeight) / 2.0); break; case InsideNW: xOffset = (int) (chart.getPlot().getBounds().getX() + LEGEND_MARGIN);