# HG changeset patch # User Sascha L. Teichmann # Date 1379672895 -7200 # Node ID 4f6b3ba542de9f2d772977b77126c1286c8dce9e # Parent 78ded33f5f5bcc4141a2aa7bc5500dd62f05ec83 Added domain axis title to diagram attributes. diff -r 78ded33f5f5b -r 4f6b3ba542de artifacts/src/main/java/org/dive4elements/river/exports/DiagramAttributes.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramAttributes.java Fri Sep 20 12:04:14 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramAttributes.java Fri Sep 20 12:28:15 2013 +0200 @@ -143,6 +143,7 @@ private Title title; private Title subtitle; + private Title domainAxisTitle; public DiagramAttributes() { axesAttrs = new ArrayList(5); @@ -155,6 +156,7 @@ parseProcessors(config); parseTitle(config); parseSubtitle(config); + parseDomainAxisTitle(config); } public List getAxesAttributes() { @@ -195,6 +197,10 @@ return subtitle; } + public Title getDomainAxisTitle() { + return domainAxisTitle; + } + private void parseProcessors(Element config) { NodeList processorNodes = config.getElementsByTagName("processor"); @@ -235,6 +241,10 @@ subtitle = extractTitle(config, "subtitle"); } + private void parseDomainAxisTitle(Element config) { + domainAxisTitle = extractTitle(config, "domain-axis"); + } + private static Title extractTitle(Element config, String tagName) { NodeList titleNodes = config.getElementsByTagName(tagName); if (titleNodes.getLength() < 1) { @@ -255,7 +265,7 @@ } public int getAxisIndex(String axisName) { - for (int i=0; i < axesAttrs.size(); i++) { + for (int i = axesAttrs.size()-1; i >= 0; --i) { if (axesAttrs.get(i).getName().equals(axisName)) { return i; } diff -r 78ded33f5f5b -r 4f6b3ba542de artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java Fri Sep 20 12:04:14 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java Fri Sep 20 12:28:15 2013 +0200 @@ -404,7 +404,6 @@ addAxisDataset(new XYSeriesCollection(series), index, visible); - AxisDataset axisDataset = (AxisDataset) getAxisDataset(index); }