comparison gnv-artifacts/src/main/java/de/intevation/gnv/chart/HorizontalProfileChart.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 f3882e94c7e0
children 79401c871da4
comparison
equal deleted inserted replaced
655:6eccb68a8b99 656:b98d1adee7a6
1 package de.intevation.gnv.chart; 1 package de.intevation.gnv.chart;
2 2
3 import java.util.Collection; 3 import java.util.Collection;
4 import java.util.Locale; 4 import java.util.Locale;
5 import java.util.Map;
5 6
6 import com.vividsolutions.jts.geom.Point; 7 import com.vividsolutions.jts.geom.Point;
7 import com.vividsolutions.jts.io.WKTReader; 8 import com.vividsolutions.jts.io.WKTReader;
8 import com.vividsolutions.jts.io.ParseException; 9 import com.vividsolutions.jts.io.ParseException;
9 10
52 locale, 53 locale,
53 linesVisible, 54 linesVisible,
54 shapesVisible 55 shapesVisible
55 ); 56 );
56 this.PLOT_ORIENTATION = PlotOrientation.VERTICAL; 57 this.PLOT_ORIENTATION = PlotOrientation.VERTICAL;
58 }
59
60
61 @Override
62 protected Object getValue(Result row) {
63 try {
64 return (Point) wktReader.read(row.getString("SHAPE"));
65 }
66 catch(ParseException pe) {
67 log.warn("No data found while parsing.");
68 return null;
69 }
57 } 70 }
58 71
59 72
60 protected void gapDetection( 73 protected void gapDetection(
61 Result[] results, 74 Result[] results,
121 // reset firstPoint for next series 134 // reset firstPoint for next series
122 firstPoint = null; 135 firstPoint = null;
123 } 136 }
124 137
125 138
139 @Override
140 protected void prepareRangeAxis(String seriesKey, int idx) {
141 return;
142 // do nothing here
143 }
144
145
146 @Override
147 protected void storeMaxValue(Map values, Object value, String parameter) {
148 return;
149 // do nothing here
150 }
151
152
126 protected String createSeriesName( 153 protected String createSeriesName(
127 String breakPoint1, 154 String breakPoint1,
128 String breakPoint2, 155 String breakPoint2,
129 String breakPoint3 156 String breakPoint3
130 ) { 157 ) {

http://dive4elements.wald.intevation.org