comparison artifacts/src/main/java/org/dive4elements/river/exports/ChartArea.java @ 9445:ff0e5386de70

Variant for inverted y axis added
author mschaefer
date Tue, 21 Aug 2018 14:16:15 +0200
parents c086b06b81e5
children
comparison
equal deleted inserted replaced
9444:ecadc9ed0ba0 9445:ff0e5386de70
24 24
25 public ChartArea(ValueAxis axisX, ValueAxis axisY) { 25 public ChartArea(ValueAxis axisX, ValueAxis axisY) {
26 this.xLower = axisX.getRange().getLowerBound(); 26 this.xLower = axisX.getRange().getLowerBound();
27 this.xUpper = axisX.getRange().getUpperBound(); 27 this.xUpper = axisX.getRange().getUpperBound();
28 this.xLength= axisX.getRange().getLength(); 28 this.xLength= axisX.getRange().getLength();
29 this.yLower = axisY.getRange().getLowerBound(); 29 if (axisY.isInverted()) {
30 this.yUpper = axisY.getRange().getUpperBound(); 30 this.yLower = axisY.getRange().getUpperBound();
31 this.yLength= axisY.getRange().getLength(); 31 this.yUpper = axisY.getRange().getLowerBound();
32 this.yLength = -axisY.getRange().getLength();
33 }
34 else {
35 this.yLower = axisY.getRange().getLowerBound();
36 this.yUpper = axisY.getRange().getUpperBound();
37 this.yLength = axisY.getRange().getLength();
38 }
32 this.xIsLog = axisX instanceof LogarithmicAxis; 39 this.xIsLog = axisX instanceof LogarithmicAxis;
33 this.yIsLog = axisY instanceof LogarithmicAxis; 40 this.yIsLog = axisY instanceof LogarithmicAxis;
34 } 41 }
35 42
36 public double ofLeft(double percent) { 43 public double ofLeft(double percent) {

http://dive4elements.wald.intevation.org