add interval splitting for bar charts
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user