import { Chart, ChartAxis, ChartGroup, ChartLegendTooltip, ChartLine, ChartThemeColor, createContainer } from '@patternfly/react-charts/victory'; interface PetData { childName?: string; name?: string; symbol?: { type: string }; x?: string; y?: number; } export const ChartTooltipEmbeddedLegend: React.FunctionComponent = () => { // Note: Container order is important const CursorVoronoiContainer = createContainer('voronoi', 'cursor'); const legendData: PetData[] = [ { childName: 'cats', name: 'Cats' }, { childName: 'dogs', name: 'Dogs', symbol: { type: 'dash' } }, { childName: 'birds', name: 'Birds' }, { childName: 'mice', name: 'Mice' } ]; const data1: PetData[] = [ { name: 'Cats', x: '2015', y: 1 }, { name: 'Cats', x: '2016', y: 2 }, { name: 'Cats', x: '2017', y: 5 }, { name: 'Cats', x: '2018', y: 3 } ]; const data2: PetData[] = [ { name: 'Dogs', x: '2015', y: 2 }, { name: 'Dogs', x: '2016', y: 1 }, { name: 'Dogs', x: '2017', y: 7 }, { name: 'Dogs', x: '2018', y: 4 } ]; const data3: PetData[] = [ { name: 'Birds', x: '2015', y: 3 }, { name: 'Birds', x: '2016', y: 4 }, { name: 'Birds', x: '2017', y: 9 }, { name: 'Birds', x: '2018', y: 5 } ]; const data4: PetData[] = [ { name: 'Mice', x: '2015', y: 3 }, { name: 'Mice', x: '2016', y: null }, { name: 'Mice', x: '2017', y: 8 }, { name: 'Mice', x: '2018', y: 7 } ]; return (