Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java @ 6453:f11165468f0a
issue1370: swap default axis (now in cm), translate annotations if in cm.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 26 Jun 2013 22:06:15 +0200 |
parents | dad4f0424783 |
children | e860fa106f56 |
comparison
equal
deleted
inserted
replaced
6452:9cbe58704604 | 6453:f11165468f0a |
---|---|
100 unit = "cm"; | 100 unit = "cm"; |
101 | 101 |
102 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT, new Object[] { unit }); | 102 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT, new Object[] { unit }); |
103 } | 103 } |
104 | 104 |
105 /** | |
106 * Generate a ForceAxisDataset for the second y axis, if requested, | |
107 * to force display of second Y axis. | |
108 @Override | |
109 protected AxisDataset createAxisDataset(int idx) { | |
110 logger.debug("Create new ForceAxisDataset for index: " + idx); | |
111 if (true || idx == 1) { | |
112 return new ForceAxisDataset(1); | |
113 } | |
114 return new XYAxisDataset(idx); | |
115 } | |
116 */ | |
105 | 117 |
106 /** | 118 /** |
107 * Create Y (range) axis for given index, here with a special axis | 119 * Create Y (range) axis for given index, here with a special axis |
108 * that depends on other axis (does translation and scaling for | 120 * that depends on other axis (does translation and scaling for |
109 * special case at gauge in cm). | 121 * special case at gauge in cm). |
171 else if (name.equals(COMPUTED_DISCHARGE_MAINVALUES_Q) | 183 else if (name.equals(COMPUTED_DISCHARGE_MAINVALUES_Q) |
172 || name.equals(MAINVALUES_Q) | 184 || name.equals(MAINVALUES_Q) |
173 || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W) | 185 || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W) |
174 || name.equals(MAINVALUES_W) | 186 || name.equals(MAINVALUES_W) |
175 ) { | 187 ) { |
176 doAnnotations((RiverAnnotation) | 188 RiverAnnotation mainValues = (RiverAnnotation) artifactFacet.getData(context); |
177 artifactFacet.getData(context), artifactFacet, attr, visible); | 189 translateRiverAnnotation(mainValues); |
190 doAnnotations( | |
191 mainValues, | |
192 artifactFacet, attr, visible); | |
178 } | 193 } |
179 else if (name.equals(STATIC_WKMS_INTERPOL) || name.equals(HEIGHTMARKS_POINTS)) { | 194 else if (name.equals(STATIC_WKMS_INTERPOL) || name.equals(HEIGHTMARKS_POINTS)) { |
180 doWAnnotations( | 195 doWAnnotations( |
181 artifactFacet.getData(context), | 196 artifactFacet.getData(context), |
182 artifactFacet, | 197 artifactFacet, |