Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/chart/AbstractXYLineChart.java @ 656:b98d1adee7a6
Added an offset of five percent between values and chart border in vertical profile charts (issue186).
gnv-artifacts/trunk@749 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 08 Mar 2010 15:15:08 +0000 |
parents | d41c155db337 |
children | 79401c871da4 |
comparison
equal
deleted
inserted
replaced
655:6eccb68a8b99 | 656:b98d1adee7a6 |
---|---|
110 localizeDomainAxis(xAxis, locale); | 110 localizeDomainAxis(xAxis, locale); |
111 localizeRangeAxis(yAxis, locale); | 111 localizeRangeAxis(yAxis, locale); |
112 | 112 |
113 // litte workarround to adjust the max range of axes. | 113 // litte workarround to adjust the max range of axes. |
114 // NumberAxis.setAutoRange(true) doesn't seem to work properly. | 114 // NumberAxis.setAutoRange(true) doesn't seem to work properly. |
115 Range yRange = (Range) ranges.get(seriesKey); | 115 Range yRange = (Range) ranges.get(seriesKey); |
116 yAxis.setRange(Range.expand(yRange, LOWER_MARGIN, UPPER_MARGIN)); | 116 yAxis.setRange(Range.expand(yRange, LOWER_MARGIN, UPPER_MARGIN)); |
117 log.debug("Max Range of dataset is: " + yRange.toString()); | 117 log.debug("Max Range of dataset is: " + yRange.toString()); |
118 | 118 |
119 if (seriesKey.contains("richtung")) { | 119 if (seriesKey.contains("richtung")) { |
120 yAxis.setTickUnit(new NumberTickUnit(30.0)); | 120 yAxis.setTickUnit(new NumberTickUnit(30.0)); |
254 } | 254 } |
255 return ""; | 255 return ""; |
256 } | 256 } |
257 | 257 |
258 | 258 |
259 protected void storeMaxRange(double value, String parameter) { | 259 protected void storeMaxRange(Map ranges, double value, String parameter) { |
260 Range range = null; | 260 Range range = null; |
261 | 261 |
262 range = ranges.containsKey(parameter) | 262 range = ranges.containsKey(parameter) |
263 ? (Range) ranges.get(parameter) | 263 ? (Range) ranges.get(parameter) |
264 : new Range(value, value); | 264 : new Range(value, value); |