# HG changeset patch # User Felix Wolfsteller # Date 1337938021 0 # Node ID 5543492f2da445558e49736c0ee7f3fc4223952a # Parent 69dd2aabbd0a5e58ddc6e8c676fc689c81a985ce Slightly improved 'line-to-curve' creation of w-mainvalues/durationcurve. flys-artifacts/trunk@4516 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 69dd2aabbd0a -r 5543492f2da4 flys-artifacts/ChangeLog --- 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 + + 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 Draw line of w-mainvalue to duration curve, baby version. diff -r 69dd2aabbd0a -r 5543492f2da4 flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java --- 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);