import cloneDeep from 'lodash/cloneDeep'
import { PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { chartInitConfig } from '@/settings/designSetting'
import { ZhiGan_YongHuShuConfig } from './index'

export const option = {
  dataset: [
    {
      title: '小程序',
      num: '728',
    },
    {
      title: 'APP用户数',
      num: '315',
    }
  ],
  dataStyle:{
    backgroud: '#FFFFFF00',
    marginTop: 30,
    marginLeft: 20,

    imageWidth: 100,
    imageHeight: 100,

    xcxNumberFontColor: '#73FF73',
    xcxNumberFontSize: 40,
    xcxTitleFontColor: '#FFFFFF',
    xcxTitleFontSize: 16,

    appNumberFontColor: '#F3C876',
    appNumberFontSize: 40,
    appTitleFontColor: '#FFFFFF',
    appTitleFontSize: 16,
  },
}

export default class Config extends PublicConfigClass implements CreateComponentType {
  public key = ZhiGan_YongHuShuConfig.key
  public attr = { ...chartInitConfig, w: 400, h: 250, zIndex: -1 }
  public chartConfig = cloneDeep(ZhiGan_YongHuShuConfig)
  public option = cloneDeep(option)
  public filter = "return res.result;"
}