legendfunction
The legend for colouring by class or by kind, in the page's language.
Import it
import { legend } from "@johnmorrisdotca/chikyu-earth/catalogue";
Definition
function legend(by: "class" | "kind", lang: "en" | "ja"): LegendEntry[]
Parameters
| Name | Type | Description |
|---|---|---|
by | "kind" | "class" |
|
lang | "en" | "ja" |
|
Returns
LegendEntry[]
One entry for each class or kind, in the legend's order.
Examples
import { legend } from "@johnmorrisdotca/chikyu-earth/catalogue";
console.log(legend("class", "en").map((one) => `${one.label} ${one.colour}`).join(", "));
console.log(legend("kind", "ja")[2]?.label);Low orbit #5dd6a2, Medium orbit #ffd166, Geostationary #ef476f, Highly elliptical #b388eb, Other #9aa5b1
デブリWhat it prints (run when this page was built)