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

removed minus and plus ones for tweaking content placement

parent c1593c0c
Branches
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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)
;
......
......@@ -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);
......
......@@ -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);
}
}
......
......@@ -214,7 +214,7 @@ public class XChartTheme implements Theme {
@Override
public int getPlotPadding() {
return 3;
return 4;
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment