add interval splitting for bar charts

This commit is contained in:
2020-04-05 08:14:09 +02:00
parent 75391f21ff
commit 50f555d23c
19 changed files with 600 additions and 80 deletions

View File

@@ -7,6 +7,7 @@ import org.lucares.pdb.plot.api.AggregateHandlerCollection;
import org.lucares.pdb.plot.api.BarChartHandler;
import org.lucares.pdb.plot.api.CumulativeDistributionHandler;
import org.lucares.pdb.plot.api.HistogramHandler;
import org.lucares.pdb.plot.api.Interval;
import org.lucares.pdb.plot.api.ParallelRequestsAggregate;
import org.lucares.pdb.plot.api.PlotSettings;
import org.lucares.pdb.plot.api.ScatterAggregateHandler;
@@ -33,6 +34,7 @@ class PlotSettingsTransformer {
result.setY1(request.getY1());
result.setY2(request.getY2());
result.setAggregates(toAggregateInternal(request.getY1(), request.getY2(), request.getAggregates()));
result.setInterval(Interval.create(request.getIntervalUnit(), request.getIntervalValue(), result.dateRange()));
return result;
}

View File

@@ -34,6 +34,8 @@ public class PlotRequest {
private boolean keyOutside;
private boolean generateThumbnail;
private String intervalUnit;
private int intervalValue;
public String getQuery() {
return query;
@@ -151,4 +153,20 @@ public class PlotRequest {
public void setY2(final YAxisDefinition y2) {
this.y2 = y2;
}
public String getIntervalUnit() {
return intervalUnit;
}
public void setIntervalUnit(final String intervalUnit) {
this.intervalUnit = intervalUnit;
}
public int getIntervalValue() {
return intervalValue;
}
public void setIntervalValue(final int intervalValue) {
this.intervalValue = intervalValue;
}
}