export enum ChartType {
  Bar = 'bar',
  Line = 'line',
  Scatter = 'scatter',
  Bubble = 'bubble',
  Pie = 'pie',
  Doughnut = 'doughnut',
  PolarArea = 'polarArea',
  Radar = 'radar',
}

export enum ChartAxisPosition {
  Top = 'top',
  Right = 'right',
  Bottom = 'bottom',
  Left = 'left',
  Center = 'center',
}

export interface IDataset {
  type?: ChartType;
  borderColor?: string;
  label?: string;
  order?: number;
  data: (string | Record<string, any>)[];
  beginAtZero?: boolean;
  fill?: string | number | boolean;
  backgroundColor?: string | string[];
  pointBackgroundColor?: string;
  pointBorderColor?: string;
  parsing?: {
    xAxisKey?: string;
    yAxisKey?: string;
  };
  spanGaps?: boolean;
  stack?: string;
}

export interface IData {
  labels?: string[];
  labelsSource?: string[];
  datasets: IDataset[];
}

export interface ChartAxis {
  label: string | string[];
  source: string | string[];
  type?: ChartType;
  fill?: boolean;
  stacked?: boolean;
  stack?: string;
  position: ChartAxisPosition;
  min?: number;
  max?: number;
}
