import cloneDeep from 'lodash/cloneDeep'
import { PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { chartInitConfig } from '@/settings/designSetting'
import { MeiRiShangBaoConfig } from './index'
import dataJson from './data.json'

const { source } = dataJson;

export const option = {
  dataset: source,
  dataStyle: {
    listWidth: 363,
    listHeight: 28,
    sortOrder: true,
    titleColor: '#FFFFFF',
    titleFontSize: 16,
    timeColor: '#16E795',
    timeFontSize: 16,
    numColor: '#73FF73',
    numFontSize: 16,
    marginbottom: 5,
    marginleft: 20,
    marginright: 20,
  }
}

export default class Config extends PublicConfigClass implements CreateComponentType {
  public key = MeiRiShangBaoConfig.key
  public attr = { ...chartInitConfig, w: 400, h: 200, zIndex: -1 }
  public chartConfig = cloneDeep(MeiRiShangBaoConfig)
  public option = cloneDeep(option)
}
