comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 1997:210020108ca4

Implemented the buildAxisSections() method in XYChartGenerator to include an AxisSection for the X axis. flys-artifacts/trunk@3434 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 16 Dec 2011 10:35:08 +0000
parents 0bd7c3cf0af1
children e71719483546
comparison
equal deleted inserted replaced
1996:c6432e8ea31e 1997:210020108ca4
921 } 921 }
922 922
923 923
924 /** 924 /**
925 * Creates new Sections for chart axes. Subclasses of this ChartGenerator 925 * Creates new Sections for chart axes. Subclasses of this ChartGenerator
926 * should override this method to include all necessary axes in that 926 * should override this method to include all necessary Y axes in that
927 * concrete chart. 927 * concrete chart. The only Section contained in the list is the X axis.
928 * 928 *
929 * @return an empty list. 929 * @return a List that contains a Section for the X axis.
930 */ 930 */
931 protected List<Section> buildAxisSections() { 931 protected List<Section> buildAxisSections() {
932 return new ArrayList<Section>(); 932 List<Section> axisSections = new ArrayList<Section>();
933
934 String identifier = "X";
935
936 AxisSection axisSection = new AxisSection();
937 axisSection.setIdentifier(identifier);
938 axisSection.setLabel(getXAxisLabel());
939 axisSection.setFontSize(14);
940 axisSection.setFixed(false);
941
942 // XXX We are able to find better default ranges that [0,0], but the Y
943 // axes currently have no better ranges set.
944 axisSection.setUpperRange(0d);
945 axisSection.setLowerRange(0d);
946
947 axisSections.add(axisSection);
948
949 return axisSections;
933 } 950 }
934 } 951 }
935 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 952 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org