import { Chart, ChartAxis, ChartBar, ChartGroup, ChartThemeColor, ChartTooltip } from '@patternfly/react-charts/victory'; interface PetData { name: string; x: string; y: number; label: string; } export const ChartBarBottomLegend: React.FunctionComponent = () => { const label = () => ({ datum }) => `${datum.name}: ${datum.y}`; const catsData: PetData[] = [ { name: 'Cats', x: '2015', y: 1, label }, { name: 'Cats', x: '2016', y: 2, label }, { name: 'Cats', x: '2017', y: 5, label }, { name: 'Cats', x: '2018', y: 3, label } ]; const dogsData: PetData[] = [ { name: 'Dogs', x: '2015', y: 2, label }, { name: 'Dogs', x: '2016', y: 1, label }, { name: 'Dogs', x: '2017', y: 7, label }, { name: 'Dogs', x: '2018', y: 4, label } ]; const birdsData: PetData[] = [ { name: 'Birds', x: '2015', y: 4, label }, { name: 'Birds', x: '2016', y: 4, label }, { name: 'Birds', x: '2017', y: 9, label }, { name: 'Birds', x: '2018', y: 7, label } ]; const miceData: PetData[] = [ { name: 'Mice', x: '2015', y: 3, label }, { name: 'Mice', x: '2016', y: 3, label }, { name: 'Mice', x: '2017', y: 8, label }, { name: 'Mice', x: '2018', y: 5, label } ]; const legendData = [{ name: 'Cats' }, { name: 'Dogs' }, { name: 'Birds' }, { name: 'Mice' }]; return (