import { Card, Radio } from 'antd'; import { FormattedMessage } from 'umi-plugin-react/locale'; import { RadioChangeEvent } from 'antd/es/radio'; import React from 'react'; import { VisitDataType } from '../data.d'; import { Pie } from './Charts'; import Yuan from '../utils/Yuan'; import styles from '../style.less'; const ProportionSales = ({ dropdownGroup, salesType, loading, salesPieData, handleChangeSalesType, }: { loading: boolean; dropdownGroup: React.ReactNode; salesType: 'all' | 'online' | 'stores'; salesPieData: VisitDataType[]; handleChangeSalesType?: (e: RadioChangeEvent) => void; }) => ( } style={{ height: '100%', }} extra={
{dropdownGroup}
} >

} total={() => {salesPieData.reduce((pre, now) => now.y + pre, 0)}} data={salesPieData} valueFormat={value => {value}} height={248} lineWidth={4} />
); export default ProportionSales;