import { Switch } from '@patternfly/react-core'; import { ChartDonutThreshold, ChartDonutUtilization, ChartThemeColor } from '@patternfly/react-charts/victory'; import { useState } from 'react'; interface Data { x: string; y: number; } export const SkeletonsDonutUtilizationThreshold: React.FunctionComponent = () => { const [isChecked, setIsChecked] = useState(true); const handleChange = (_event: React.FormEvent, checked: boolean) => { setIsChecked(checked); }; const data1: Data[] = [ { x: 'Warning at 60%', y: 60 }, { x: 'Danger at 90%', y: 90 } ]; const data2: Data = { x: 'Storage capacity', y: 45 }; return ( <>
(datum.x ? datum.x : null)} name="chart7" themeColor={isChecked ? ChartThemeColor.skeleton : ChartThemeColor.blue} > (datum.x ? `${datum.x}: ${datum.y}%` : null)} subTitle="of 100 GBps" title="45%" />
); };