comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java @ 848:47280aff0eb7

Added an y-axis label in histograms (issue243). gnv-artifacts/trunk@964 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 21 Apr 2010 09:43:46 +0000
parents ac5988f27714
children 4bcf7bf4bfb7
comparison
equal deleted inserted replaced
847:42c4cfc0d133 848:47280aff0eb7
417 int size = data.length; 417 int size = data.length;
418 Chart[] histograms = new Chart[size]; 418 Chart[] histograms = new Chart[size];
419 419
420 for (int i = 0; i < size; i++) { 420 for (int i = 0; i < size; i++) {
421 ChartLabels labels = createHistogramLabels( 421 ChartLabels labels = createHistogramLabels(
422 uuid, callContext, data[i]); 422 uuid, callContext, locale, data[i]);
423 423
424 ChartTheme theme = createStyle(callContext); 424 ChartTheme theme = createStyle(callContext);
425 425
426 histograms[i] = new DefaultHistogram( 426 histograms[i] = new DefaultHistogram(
427 labels, data[i], theme, requestParameter); 427 labels, data[i], theme, requestParameter);
1109 * @param context The CallContext object. 1109 * @param context The CallContext object.
1110 * @param data An array storing strings. 1110 * @param data An array storing strings.
1111 * @return A ChartLabels object with the 1st string in <i>data</i> as title. 1111 * @return A ChartLabels object with the 1st string in <i>data</i> as title.
1112 */ 1112 */
1113 protected ChartLabels createHistogramLabels( 1113 protected ChartLabels createHistogramLabels(
1114 String uuid, CallContext context, Object[] data) 1114 String uuid, CallContext context, Locale locale, Object[] data)
1115 { 1115 {
1116 return new ChartLabels((String) data[0], "", ""); 1116 RessourceFactory fac = RessourceFactory.getInstance();
1117
1118 return new ChartLabels(
1119 (String) data[0],
1120 "",
1121 "",
1122 fac.getRessource(locale, "histogram.axis.range.title", ""));
1117 } 1123 }
1118 1124
1119 1125
1120 /** 1126 /**
1121 * Returns the selected fis name. 1127 * Returns the selected fis name.

http://dive4elements.wald.intevation.org