move scatter plot creation into an AggregateHandler

This commit is contained in:
2019-10-20 08:11:09 +02:00
parent 7c61686808
commit b7c4fe4c1f
19 changed files with 186 additions and 109 deletions

View File

@@ -5,6 +5,7 @@ import org.lucares.pdb.plot.api.NullAggregate;
import org.lucares.pdb.plot.api.ParallelRequestsAggregate;
import org.lucares.pdb.plot.api.CumulativeDistributionHandler;
import org.lucares.pdb.plot.api.PlotSettings;
import org.lucares.pdb.plot.api.ScatterAggregateHandler;
import org.lucares.pdb.plot.api.TimeRangeUnitInternal;
import org.lucares.pdbui.domain.Aggregate;
import org.lucares.pdbui.domain.PlotRequest;
@@ -61,6 +62,8 @@ class PlotSettingsTransformer {
return new CumulativeDistributionHandler();
case PARALLEL:
return new ParallelRequestsAggregate();
case SCATTER:
return new ScatterAggregateHandler();
}
throw new IllegalStateException("unhandled enum: " + aggregate);
}

View File

@@ -1,14 +1,19 @@
package org.lucares.pdbui.domain;
/**
* Note: The order in this enum defines the order in which the aggregates are drawn.
*/
public enum Aggregate {
NONE,
PARALLEL,
SCATTER,
/**
* Empirical cumulative distribution functions
*
* @see https://serialmentor.com/dataviz/ecdf-qq.html
*/
CUM_DISTRIBUTION,
PARALLEL
}