package ru.micord.ervu_dashboard.component.chart.label;

import ru.micord.ervu_dashboard.model.Font;
import ru.micord.ervu_dashboard.model.chart.round.label.ChartLabelModel;

import ru.cg.webbpm.modules.database.api.dao.option.LoadOptions;
import ru.cg.webbpm.modules.standard_annotations.editor.ColorEditor;

/**
 * @author Vitaly Chekushkin
 */
public abstract class AbstractRoundLabelConfiguration implements RoundLabelConfiguration {

  public Font font;

  @ColorEditor
  public String color;

  @Override
  public ChartLabelModel getLabelModel(LoadOptions loadOptions) {
    return new ChartLabelModel(
        getLabel(loadOptions),
        color,
        font
    );
  }

  abstract protected String getLabel(LoadOptions loadOptions);
}
