Adjust Chart
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Dieser Commit ist enthalten in:
Chaoscaot 2024-02-17 02:49:44 +01:00
Ursprung af870a70bc
Commit dc771db3e4

Datei anzeigen

@ -34,7 +34,7 @@
import 'chartjs-adapter-dayjs-4'
export let data: FightStats;
let chart: Chart;
let chart: Chart<"line", {x: string; y: number}[], unknown>;
let canvas: HTMLCanvasElement;
onMount(async () => {
@ -43,7 +43,7 @@
Chart.defaults.color = "#fff"
}
const colors = ["#abfa91", "#279900", "#00ffbe", "#9297fb", "#050b9d", "#b60fff", "#8dddfc", "#0880ad", "#41ff00", "#039973", "#96fce2", "#0009ff", "#7501a4", "#e2a2fb", "#00b9ff"];
const colors = ["#abfa91", "#279900", "#00ffbe", "#9297fb", "#050b9d", "#b60fff", "#8dddfc", "#0880ad", "#41ff00", "#039973", "#96fce2", "#0009ff", "#7501a4", "#e2a2fb", "#00b9ff", "#372a42", "#dee0da", "#dec5ed", "#e1be89", "#330c3d"];
const map = new Map<string, { x: string, y: number }[]>()
for (const point of data) {
const dataset = map.get(point.gamemode) ?? []
@ -69,6 +69,7 @@
borderColor: color,
backgroundColor: color,
spanGaps: true,
cubicInterpolationMode: "monotone",
data
};
})