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

bug fixes - plot right padding was falsely calculated.

parent bc5dc3b9
No related branches found
No related tags found
No related merge requests found
......@@ -197,9 +197,23 @@ public class Axis implements ChartPart {
chartLegendWidth = getChartPainter().getChartLegend().getSizeHint()[0];
}
int width = (int) (getChartPainter().getWidth() - axisPair.getyAxis().getBounds().getWidth() - chartLegendWidth - 2 * getChartPainter().getStyleManager().getChartPadding()
- getChartPainter().getStyleManager().getPlotPadding() - (getChartPainter().getStyleManager().getLegendPosition() == LegendPosition.OutsideE ? getChartPainter().getStyleManager()
.getChartPadding() : 0));
int width = (int) (
getChartPainter().getWidth()
- axisPair.getyAxis().getBounds().getWidth()
- chartLegendWidth
- 2 * getChartPainter().getStyleManager().getChartPadding()
- (getChartPainter().getStyleManager().isYAxisTicksVisible() ? (getChartPainter().getStyleManager().getPlotPadding() + 1) : 0)
- (getChartPainter().getStyleManager().getLegendPosition() == LegendPosition.OutsideE && getChartPainter().getStyleManager().isLegendVisible() ? getChartPainter().getStyleManager()
.getChartPadding() : 0)
);
int height = this.getSizeHint();
Rectangle xAxisRectangle = new Rectangle(xOffset, yOffset, width, height);
this.paintZone = xAxisRectangle;
......
......@@ -63,7 +63,9 @@ public class Plot implements ChartPart {
+ chartPainter.getAxisPair().getyAxis().getBounds().getWidth()
+ (chartPainter.getStyleManager().isYAxisTicksVisible() ? (chartPainter.getStyleManager().getPlotPadding() + 1) : 0));
+ (chartPainter.getStyleManager().isYAxisTicksVisible() ? (chartPainter.getStyleManager().getPlotPadding() + 1) : 0)
);
int yOffset = (int) (chartPainter.getAxisPair().getyAxis().getBounds().getY());
int width = (int) chartPainter.getAxisPair().getxAxis().getBounds().getWidth();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment