Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/histogram/HistogramHelper.java @ 1080:01e26528bb39
Some code refactoring for the implementation of histograms using vectorial parameters.
gnv-artifacts/trunk@1182 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 09 Jun 2010 09:37:57 +0000 |
parents | b1f5f2a8840f |
children | 846b2b70b2e0 |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/histogram/HistogramHelper.java Wed Jun 09 07:38:40 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/histogram/HistogramHelper.java Wed Jun 09 09:37:57 2010 +0000 @@ -215,5 +215,26 @@ } return ""; } + + + /** + * Creates and returns labels to decorate histograms. + * + * @param uuid The UUID of the current artifact. + * @param context The CallContext object. + * @param data An array storing strings. + * @return A ChartLabels object with the 1st string in <i>data</i> as title. + */ + public static ChartLabels createHistogramLabels( + String uuid, CallContext context, Locale locale, Object[] data) + { + RessourceFactory fac = RessourceFactory.getInstance(); + + return new ChartLabels( + (String) data[0], + "", + "", + fac.getRessource(locale, "histogram.axis.range.title", "")); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :