diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Axis.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Axis.java index e3e91564be8b8c6f69b842659d2b45d4dc17858a..97765416fc4821194ac88cf0e09382baa0660f91 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Axis.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Axis.java @@ -211,7 +211,7 @@ public class Axis implements ChartPart { - 2 * getChartPainter().getStyleManager().getChartPadding() - - (getChartPainter().getStyleManager().isYAxisTicksVisible() ? (getChartPainter().getStyleManager().getPlotPadding() + 1) : 0) + - (getChartPainter().getStyleManager().isYAxisTicksVisible() ? (getChartPainter().getStyleManager().getPlotPadding()) : 0) - (getChartPainter().getStyleManager().getLegendPosition() == LegendPosition.OutsideE && getChartPainter().getStyleManager().isLegendVisible() ? getChartPainter().getStyleManager() .getChartPadding() : 0) diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Plot.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Plot.java index bf49f65c897417c2be8e7d9e0b4ef67b7a786a4e..03c7f416227ca8254e4d250b934afc313dc8365e 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Plot.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Plot.java @@ -63,7 +63,7 @@ public class Plot implements ChartPart { + chartPainter.getAxisPair().getyAxis().getBounds().getWidth() - + (chartPainter.getStyleManager().isYAxisTicksVisible() ? (chartPainter.getStyleManager().getPlotPadding() + 1) : 0) + + (chartPainter.getStyleManager().isYAxisTicksVisible() ? (chartPainter.getStyleManager().getPlotPadding()) : 0) ; diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentLineChart.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentLineChart.java index 27cccf26c37daa4e8a56394f5ef6ef6688ed0d32..d7510c9dcb9f14ed464923609909bbe91a1314fd 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentLineChart.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentLineChart.java @@ -156,7 +156,7 @@ public class PlotContentLineChart extends PlotContent { yTransform = bounds.getHeight() / 2.0; } - double xOffset = bounds.getX() + xTransform - 1; + double xOffset = bounds.getX() + xTransform; double yOffset = bounds.getY() + yTransform; // System.out.println(yOffset); // System.out.println(yTransform); diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotSurface.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotSurface.java index ef5ceb84c2e2de04cd6c4150beea8106a1c67982..d27434ec05129372ced3bebc09b5bb262a3516cd 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotSurface.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotSurface.java @@ -78,7 +78,7 @@ public class PlotSurface implements ChartPart { g.setColor(getChartPainter().getStyleManager().getPlotGridLinesColor()); g.setStroke(getChartPainter().getStyleManager().getPlotGridLinesStroke()); - Shape line = new Line2D.Double( bounds.getX(), yOffset, bounds.getX() + bounds.getWidth() - 2, yOffset); + Shape line = new Line2D.Double(bounds.getX(), yOffset, bounds.getX() + bounds.getWidth(), yOffset); g.draw(line); } // tick marks @@ -88,7 +88,7 @@ public class PlotSurface implements ChartPart { g.setStroke(getChartPainter().getStyleManager().getAxisTickMarksStroke()); Shape line = new Line2D.Double(bounds.getX(), yOffset, bounds.getX() + getChartPainter().getStyleManager().getAxisTickMarkLength(), yOffset); g.draw(line); - line = new Line2D.Double((bounds.getX() + bounds.getWidth() - 2), yOffset, (bounds.getX() + bounds.getWidth() - 2) - getChartPainter().getStyleManager().getAxisTickMarkLength(), yOffset); + line = new Line2D.Double(bounds.getX() + bounds.getWidth(), yOffset, bounds.getX() + bounds.getWidth() - getChartPainter().getStyleManager().getAxisTickMarkLength(), yOffset); g.draw(line); } } @@ -101,14 +101,14 @@ public class PlotSurface implements ChartPart { for (int i = 0; i < xAxisTickLocations.size(); i++) { double tickLocation = xAxisTickLocations.get(i); - double xOffset = bounds.getX() + tickLocation - 1; + double xOffset = bounds.getX() + tickLocation; // draw lines if (getChartPainter().getStyleManager().isPlotGridLinesVisible()) { g.setColor(getChartPainter().getStyleManager().getPlotGridLinesColor()); g.setStroke(getChartPainter().getStyleManager().getPlotGridLinesStroke()); - Shape line = new Line2D.Double(xOffset, bounds.getY(), xOffset, bounds.getY() + bounds.getHeight() - 1); + Shape line = new Line2D.Double(xOffset, bounds.getY(), xOffset, bounds.getY() + bounds.getHeight()); g.draw(line); } // tick marks @@ -119,8 +119,7 @@ public class PlotSurface implements ChartPart { Shape line = new Line2D.Double(xOffset, bounds.getY(), xOffset, bounds.getY() + getChartPainter().getStyleManager().getAxisTickMarkLength()); g.draw(line); - line = new Line2D.Double(xOffset, bounds.getY() + bounds.getHeight() - 1, xOffset, bounds.getY() + bounds.getHeight() - 1 - - getChartPainter().getStyleManager().getAxisTickMarkLength()); + line = new Line2D.Double(xOffset, bounds.getY() + bounds.getHeight(), xOffset, bounds.getY() + bounds.getHeight() - getChartPainter().getStyleManager().getAxisTickMarkLength()); g.draw(line); } } diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/style/XChartTheme.java b/xchart/src/main/java/com/xeiam/xchart/internal/style/XChartTheme.java index c42e4caf4146fbe980afa6604d59cebbe9939f4e..65a28d8eb833fcfabb1edb08910122a6367a83cb 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/style/XChartTheme.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/style/XChartTheme.java @@ -214,7 +214,7 @@ public class XChartTheme implements Theme { @Override public int getPlotPadding() { - return 3; + return 4; } @Override