Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java @ 8341:130160b8d245
Introduce annotations, which know to which axis they belong.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 30 Sep 2014 11:50:43 +0200 |
parents | ac7cb15e1946 |
children | 31272d799dad |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Tue Sep 30 10:57:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Tue Sep 30 11:50:43 2014 +0200 @@ -18,6 +18,7 @@ import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; +import java.util.ArrayList; import java.util.Map; import java.util.Set; @@ -39,6 +40,7 @@ import org.dive4elements.river.exports.process.Processor; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.AnnotationHelper; import org.dive4elements.river.jfree.AxisDataset; import org.dive4elements.river.jfree.Bounds; @@ -226,6 +228,8 @@ // These have to go after the autozoom. AnnotationHelper.addAnnotationsToRenderer(annotations, plot, getChartSettings(), datasets); + AnnotationHelper.addYAnnotationsToRenderer(yAnnotations, plot, + getChartSettings(), datasets); // Add a logo (maybe). addLogo(plot); @@ -564,6 +568,14 @@ } + public void addYAnnotation( + RiverAnnotation annotation, + String axisName + ) { + addYAnnotation(annotation, diagramAttributes.getAxisIndex(axisName)); + } + + /** * Effect: extend range of x axis to include given limits. *