package ervu_business_metrics.model.chart.round;

import ervu_business_metrics.model.chart.ErvuChartDatasetType;
import rpc.LoadGraphSource;

import ru.cg.webbpm.modules.database.api.dao.LoadDao;
import ru.cg.webbpm.modules.standard_annotations.editor.ColorEditor;
import ru.cg.webbpm.modules.standard_annotations.editor.Visible;
import ru.cg.webbpm.modules.standard_annotations.validation.NotNull;

/**
 * @author Vitaly Chekushkin
 */
public class RoundChartDataSetConfiguration implements LoadGraphSource {
  @NotNull
  public LoadDao loadDao;

  @NotNull
  public ErvuChartDatasetType datasetType;

  @NotNull(predicate = "datasetType == ErvuChartDatasetType.AGGREGATION")
  @Visible(predicate = "datasetType == ErvuChartDatasetType.AGGREGATION")
  public RoundAggregationDataSet aggregationDataSet;

  @NotNull(predicate = "datasetType == ErvuChartDatasetType.STATIC")
  @Visible(predicate = "datasetType == ErvuChartDatasetType.STATIC")
  public RoundStaticDataSet staticDataSet;

  @NotNull(predicate = "datasetType == ErvuChartDatasetType.COLUMN_AGGREGATION")
  @Visible(predicate = "datasetType == ErvuChartDatasetType.COLUMN_AGGREGATION")
  public RoundColumnAggregationDataSet columnAggregationDataSet;

  @ColorEditor
  @Visible(predicate = "datasetType != ErvuChartDatasetType.COLUMN_AGGREGATION")
  public String[] backgroundColors = new String[0];

  public Integer borderWidth;
  public String radius;
  public String cutout;

  public Integer hoverOffset;
}
