changeset 2777:5543492f2da4

Slightly improved 'line-to-curve' creation of w-mainvalues/durationcurve. flys-artifacts/trunk@4516 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 25 May 2012 09:27:01 +0000
parents 69dd2aabbd0a
children 26f2e7e500dd
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri May 25 09:14:44 2012 +0000
+++ b/flys-artifacts/ChangeLog	Fri May 25 09:27:01 2012 +0000
@@ -1,3 +1,11 @@
+2012-05-25	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	Draw line of w-mainvalue to duration curve hit point to ground.
+
+	* src/main/java/de/intevation/flys/exports/XYChartGenerator.java:
+	  If StickyAxisAnnotation has a hit point set, also add line annotation
+	  from the crossing point to the x-axis.
+
 2012-05-25	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Draw line of w-mainvalue to duration curve, baby version.
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Fri May 25 09:14:44 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Fri May 25 09:27:01 2012 +0000
@@ -814,11 +814,17 @@
         plot.getRenderer(rendererIndex).addAnnotation(textAnnotation,
             org.jfree.ui.Layer.FOREGROUND);
         if (!Float.isNaN(annotation.getHitPoint())) {
+            // TODO let line be styled and respect X/Y-ness.
             // New line annotation to hit curve.
             XYLineAnnotation hitLineAnnotation = new XYLineAnnotation(area.atLeft(),
                 annotation.getPos(), annotation.getHitPoint(), annotation.getPos());
+            XYLineAnnotation lineBackAnnotation = new XYLineAnnotation(
+                annotation.getHitPoint(), annotation.getPos(),
+                annotation.getHitPoint(), area.atGround());
             plot.getRenderer(rendererIndex).addAnnotation(hitLineAnnotation,
                 org.jfree.ui.Layer.BACKGROUND);
+            plot.getRenderer(rendererIndex).addAnnotation(lineBackAnnotation,
+                org.jfree.ui.Layer.BACKGROUND);
         }
         plot.getRenderer(rendererIndex).addAnnotation(lineAnnotation,
             org.jfree.ui.Layer.FOREGROUND);

http://dive4elements.wald.intevation.org