package ervu_dashboard.model.chart.round;

import ervu_dashboard.model.chart.ChartDatasetType;
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 ChartDatasetType datasetType;

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

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

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

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

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

  public Integer hoverOffset;
}
