# HG changeset patch # User Ingo Weinzierl # Date 1324031708 0 # Node ID 210020108ca4d77c50e12368290c70d3ea453a2b # Parent c6432e8ea31ea3ed9dba468c66c09e10a6c6a6eb Implemented the buildAxisSections() method in XYChartGenerator to include an AxisSection for the X axis. flys-artifacts/trunk@3434 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r c6432e8ea31e -r 210020108ca4 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Fri Dec 16 10:25:55 2011 +0000 +++ b/flys-artifacts/ChangeLog Fri Dec 16 10:35:08 2011 +0000 @@ -1,3 +1,12 @@ +2011-12-16 Ingo Weinzierl + + * src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java: + Calls super.buildAxisSections(). + + * src/main/java/de/intevation/flys/exports/XYChartGenerator.java: + Implemented the method buildAxisSections(). The result list will contain + an AxisSection for the X axis. + 2011-12-16 Ingo Weinzierl * src/main/java/de/intevation/flys/collections/AttributeWriter.java: Bugfix: diff -r c6432e8ea31e -r 210020108ca4 flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java --- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Fri Dec 16 10:25:55 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Fri Dec 16 10:35:08 2011 +0000 @@ -467,7 +467,7 @@ @Override protected List
buildAxisSections() { - List
axisSections = new ArrayList
(); + List
axisSections = super.buildAxisSections(); for (YAXIS axis: YAXIS.values()) { String identifier = axis.toString(); diff -r c6432e8ea31e -r 210020108ca4 flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java --- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Fri Dec 16 10:25:55 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Fri Dec 16 10:35:08 2011 +0000 @@ -923,13 +923,30 @@ /** * Creates new Sections for chart axes. Subclasses of this ChartGenerator - * should override this method to include all necessary axes in that - * concrete chart. + * should override this method to include all necessary Y axes in that + * concrete chart. The only Section contained in the list is the X axis. * - * @return an empty list. + * @return a List that contains a Section for the X axis. */ protected List
buildAxisSections() { - return new ArrayList
(); + List
axisSections = new ArrayList
(); + + String identifier = "X"; + + AxisSection axisSection = new AxisSection(); + axisSection.setIdentifier(identifier); + axisSection.setLabel(getXAxisLabel()); + axisSection.setFontSize(14); + axisSection.setFixed(false); + + // XXX We are able to find better default ranges that [0,0], but the Y + // axes currently have no better ranges set. + axisSection.setUpperRange(0d); + axisSection.setLowerRange(0d); + + axisSections.add(axisSection); + + return axisSections; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :