Skip to content
Snippets Groups Projects
Commit cd7d7844 authored by Jürgen Walter's avatar Jürgen Walter
Browse files

improved result visualization

parent c24695df
No related branches found
No related tags found
No related merge requests found
......@@ -129,13 +129,14 @@ public class BarChart extends AbstractVisualizationType implements IVisualizatio
Plot plot = chart.getPlot();
// TODO remove range
}
int i = 0;
for (AbstractQuantitativeResult r : this.getResult().getResults()) {
if (r instanceof ValueResultPavo) {
if (visualizeValuesAsLines) {
ValueMarker marker = new ValueMarker(((ValueResultPavo) r).getValue());
marker.setPaint(Color.green);
marker.setLabel(((ValueResultPavo) r).getName());
marker.setLabel(((ValueResultPavo) r).getStatisticType()); // getName());
marker.setLabelAnchor(RectangleAnchor.BOTTOM_RIGHT);
marker.setLabelTextAnchor(TextAnchor.TOP_RIGHT);
((XYPlot) chart.getPlot()).addRangeMarker(marker);
......@@ -149,7 +150,9 @@ public class BarChart extends AbstractVisualizationType implements IVisualizatio
// name = name + " " + dof.getDofvalue();
// // dof.getDofname()
// }
if (((ValueResultPavo) r).getDofs().size() == 1) {
if (((ValueResultPavo) r).getDofs().size() == 0) {
name = r.getQueryableElement();
} else if (((ValueResultPavo) r).getDofs().size() == 1) {
name = name + ((int) ((ValueResultPavo) r).getDofs().get(0).getDofvalue());
} else {
name = name + ((int) ((ValueResultPavo) r).getDofs().get(1).getDofvalue());
......@@ -157,7 +160,12 @@ public class BarChart extends AbstractVisualizationType implements IVisualizatio
XYSeries bar = new XYSeries(name);
bar.add(0, ((ValueResultPavo) r).getValue());
dataset.addSeries(bar);
try {
dataset.addSeries(bar);
} catch (Exception e) {
bar.setKey(name + i++);
dataset.addSeries(bar);
}
}
} else if (r instanceof SeriesResultPavo) {
......
......@@ -73,7 +73,7 @@ public class ScatterPlot extends AbstractVisualizationType implements IVisualiza
} else if (r instanceof ValueResultPavo) {
ValueMarker marker = new ValueMarker(((ValueResultPavo) r).getValue());
marker.setPaint(Color.green);
marker.setLabel(((ValueResultPavo) r).getName());
marker.setLabel(((ValueResultPavo) r).getStatisticType()); // getName());
marker.setLabelAnchor(RectangleAnchor.BOTTOM_RIGHT);
marker.setLabelTextAnchor(TextAnchor.TOP_RIGHT);
((XYPlot) chart.getPlot()).addRangeMarker(marker);
......@@ -85,8 +85,8 @@ public class ScatterPlot extends AbstractVisualizationType implements IVisualiza
}
XYPlot plot = (XYPlot) chart.getPlot();
plot.setBackgroundPaint(Color.white);
plot.setRangeGridlinePaint(Color.lightGray);
plot.setDomainGridlinePaint(Color.lightGray);
plot.setRangeGridlinePaint(Color.white);
plot.setDomainGridlinePaint(Color.white);
// TODO improve legend formatting
// https://stackoverflow.com/questions/13307500/how-to-display-legend-for-pie-chart-in-columns/13309587#13309587
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment