Mercurial > dive4elements > river
changeset 7107:564033adf9c6 generator-refactoring
Handle axis include zero setting for the new processing architecture
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 24 Sep 2013 11:27:28 +0200 |
parents | ed8623b989f3 |
children | 54fa03dad18c |
files | artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java |
diffstat | 2 files changed, 10 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Tue Sep 24 11:26:45 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Tue Sep 24 11:27:28 2013 +0200 @@ -1103,4 +1103,14 @@ } } } + + @Override + protected NumberAxis createYAxis(int index) { + NumberAxis axis = super.createYAxis(index); + + if (diagramAttributes.getAxesAttributes().get(index).includeZero()) { + axis.setAutoRangeIncludesZero(true); + } + return axis; + } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java Tue Sep 24 11:26:45 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java Tue Sep 24 11:27:28 2013 +0200 @@ -38,27 +38,5 @@ } return super.getDefaultChartSubtitle(); } - - /** - * Create Axis for given index. - * @return axis with according internationalized label. - */ - @Override - protected NumberAxis createYAxis(int index) { - // TODO decide what to do with this. - return super.createYAxis(index); - /* - NumberAxis axis = super.createYAxis(index); - - // "Q" Axis shall include 0. - if (index == YAXIS.Q.idx) { - axis.setAutoRangeIncludesZero(true); - } - else { - axis.setAutoRangeIncludesZero(false); - } - - return axis;*/ - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :