Player heat map
Where one player touched the ball, warmer where he was most often, with his share in each third. Good for roles and positions of a player in a match.
The smallest code that works. change the code, then press Run
In your framework
import { Chart } from 'nervure/react';
const spec = {
type: 'touchmap',
player: 'Rami Jaziri',
touches: [
[49.3, 3.5],
[54.5, 4.5],
[70.1, 34.3],
[42.5, 11.4],
[65.2, 48.1],
[67.2, 28.9],
[102.9, 33.3],
[86.2, 27.2],
[66, 14.8],
[62.3, 15.5],
[61.4, 13.1],
[44.3, 5.6],
[76.7, 36.3],
[48.5, 20.8],
[71.6, 52.9],
[52.6, 19.3],
[63.9, 27.2],
[51.8, 3.5],
[90, 9.2],
[73.9, 13.6],
[44.7, 10.9],
[46.2, 10.8],
[78.2, 20.1],
[66.4, 18.7],
[75.6, 19.4],
[76.8, 30.9],
[60, 26],
[43.5, 13.3],
[85.2, 19],
[54.4, 23.4],
[51.7, 21.1],
[40.3, 12.2],
[39.6, 12.3],
[74, 15.6],
[57.9, 21.7],
[49.4, 9.4],
[48.5, 8.9],
[85.4, 21.7],
[69, 29],
[84.4, 25.1],
[81.9, 31.3],
[35.8, 11.3],
[60.2, 33.4],
[59.8, 15.7],
[35, 18.6],
[63.2, 9.2],
[69.9, 18],
[68.2, 7.4],
[81, 22.3],
[59.7, 27.3],
[45.2, 36.6],
[54.9, 20.9],
[44.9, 23.6],
[87.9, 25.4],
[50.3, 24.3],
[66.5, 12.2],
[54, 29.2],
[75.6, 13],
[53.2, 23.5],
[59.8, 28.2],
[90.8, 33.8],
[33, 2.8],
[69.6, 4.2],
[113, 23.4],
[76.8, 1.5],
[83.2, 21.2],
[58.1, 17.5],
[40.1, 29.7],
[52.2, 22.5],
[78.9, 10.4],
[68.1, 16.7],
[48.5, 29.4],
[97.5, 24.7],
[73.1, 37.3],
[43, 26.8],
[24.5, 5.5],
[87.5, 21],
[54.4, 15.2],
[51.9, 19.3],
[77.7, 13.7],
[64, 39.2],
[48.5, 14.9],
[66.6, 18.3],
[50.9, 34.9],
[51.4, 20.8],
[80.7, 36.7],
[71, 17],
[46.7, 10.1],
[82.5, 31.6],
[74.4, 33.2],
],
};
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 touchmap takes:
/** Where one player touched the ball, as a heat map on the pitch. */
interface TouchMapSpec extends Base {
type: 'touchmap';
/** Each touch: along, from the own goal (0) to the goal attacked (100), and across. */
touches: [number, number][];
player?: string;
/** Cells along the pitch: 12 by default. */
cells?: 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