import { Switch } from '@patternfly/react-core'; import { ChartDonut, ChartThemeColor } from '@patternfly/react-charts/victory'; import { useState } from 'react'; interface PetData { name?: string; x?: string; y?: number; } export const SkeletonsDonutChart: React.FunctionComponent = () => { const [isChecked, setIsChecked] = useState(true); const handleChange = (_event: React.FormEvent, checked: boolean) => { setIsChecked(checked); }; const data: PetData[] = [ { x: 'Cats', y: 35 }, { x: 'Dogs', y: 55 }, { x: 'Birds', y: 10 } ]; return ( <>
`${datum.x}: ${datum.y}%`} name="chart5" subTitle="Pets" themeColor={isChecked ? ChartThemeColor.skeleton : ChartThemeColor.blue} title="100" />
); };