Dieser Commit ist enthalten in:
Ursprung
af870a70bc
Commit
dc771db3e4
@ -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
|
||||
};
|
||||
})
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren