1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Legend, Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
5 import { getUserName } from '../../helpers/Participant';
6 import { getRunners, getScoreTable } from '../../helpers/Tournament';
24 <ResponsiveContainer height="100%" width="100%">
25 <LineChart data={getScoreTable(tournament)} height={720} width={1280}>
26 <XAxis dataKey="number" />
30 {getRunners(tournament).map((runner, index) =>
32 dataKey={getUserName(runner)}
34 stroke={COLORS[index % COLORS.length]}
39 </ResponsiveContainer>;
41 ScoreChart.propTypes = {
42 tournament: PropTypes.shape({
46 export default ScoreChart;