Fight scorecard
The cards of the judges round by round, the totals and the decision. Good for boxing, kickboxing and fights decided on points.
The smallest code that works. change the code, then press Run
In your framework
import { Chart } from 'nervure/react';
const spec = {
type: 'fightcard',
fighters: [{ name: 'Karim Mansour', color: '#c8384f' }, { name: 'Hugo Lefèvre', color: '#2f5fae' }],
judges: [
{ name: 'Judge A', rounds: [[10, 9], [10, 9], [10, 9], [10, 9], [10, 9], [10, 9], [9, 10], [10, 9], [10, 9], [10, 9]] },
{ name: 'Judge B', rounds: [[10, 9], [10, 9], [9, 10], [10, 10], [9, 10], [10, 10], [10, 9], [10, 9], [10, 9], [9, 10]] },
{ name: 'Judge C', rounds: [[10, 10], [10, 9], [9, 10], [10, 9], [9, 10], [10, 9], [10, 9], [10, 9], [9, 10], [10, 9]] },
],
};
export default function Example() {
return <Chart spec={spec} style={{ height: 340 }} />;
}Or import this chart alone: what each import weighs.
Options
Beside the fields shared by every chart (title, format, heading, export…), type fightcard takes:
/** The cards of the judges of a fight, round by round, and the decision. */
interface FightCardSpec extends Base {
type: 'fightcard';
fighters: [Side, Side];
judges: { name: string; rounds: [number, number][] }[];
}Style it
- Colours:
theme.palette,chart.setColor(name, colour), or--nervure-palettein your CSS. More - Marks:
[data-series="name"], parts:[data-part="axes"],legend,series. What you change is kept in exports. - Movement:
animation: falsedraws at once. More - Files:
chart.download('png'),svg,csv. More