Skip to the content

Taisen Brackets対戦

Knockout brackets as SVG, from a list of ties.

Taisen (対戦, たいせん) is Japanese for a matchup: two sides facing each other. About the name

Contents

Reference · Draw a bracket, a table or a road to the final

rankingListfunction

The ranking list as an SVG. Throws a RangeError for an entry with no name, a rank or change that is not a whole number, an option that is not one of its values, or a bad size or theme.

Import it

import { rankingList } from "@johnmorrisdotca/taisen-brackets";

Definition

function rankingList(source: RankingSource, options?: RankingOptions): string

Parameters

NameTypeDescription
sourceRankingSource

The ranking.

options (optional)RankingOptions

The style, rows and page, columns, movement, the size, the theme and the language.

Returns

string

The SVG, a string that begins with <svg.

Examples

import { rankingCategoryLabel, rankingList } from "@johnmorrisdotca/taisen-brackets";

const svg = rankingList({ category: rankingCategoryLabel({ age: "U18", sex: "men", weight: "-60" }), date: "October 2026", entries: [
  { name: { surname: "Nakamura", given: "Kenji" }, club: "Coastal Pine Judo", flag: "CA-BC", points: 412.5, change: 1 },
  { name: { surname: "Brar", given: "Harpreet" }, club: "Salmonberry Judo Club", flag: "CA-BC", points: 398, change: -1 },
  { name: { surname: "Leclerc", given: "Mathieu" }, club: "Kestrel Valley Judo", flag: "CA-QC", points: 366.25, change: 4 },
] }, { precision: 2, size: "portrait" });
console.log(svg.includes("U18 · Men -60 kg"), svg.includes("NAKAMURA Kenji"), svg.includes("412.50"));
true true true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/taisen-brackets 0.20.0.