From d9bb3c82f7ca2d4734cd851965a56a38f7b8deed Mon Sep 17 00:00:00 2001 From: cyclane Date: Mon, 19 Jul 2021 02:56:02 +0100 Subject: [PATCH] Removed title and fixed optimizer --- src/routes/api/graphs/[graph]/[profile]/[player].ts | 6 +++--- .../profile/[profile]/member/[member]/graph/[graph].svelte | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/routes/api/graphs/[graph]/[profile]/[player].ts b/src/routes/api/graphs/[graph]/[profile]/[player].ts index 485b44a..818d157 100644 --- a/src/routes/api/graphs/[graph]/[profile]/[player].ts +++ b/src/routes/api/graphs/[graph]/[profile]/[player].ts @@ -41,15 +41,15 @@ export async function get( ).all(); res.writeHead(200); if (graph.data.style === "line") { - if (data[0].length === 2) { + if (data[0].length === 2 && !Array.isArray(data[0][0])) { res.end( JSON.stringify( data.filter((value, idx) => { return ( idx === 0 || idx === data.length - 1 || - data[idx - 1][1] !== value || - data[idx + 1][1] !== value + data[idx - 1][1] !== value[1] || + data[idx + 1][1] !== value[1] ); }) ) diff --git a/src/routes/profile/[profile]/member/[member]/graph/[graph].svelte b/src/routes/profile/[profile]/member/[member]/graph/[graph].svelte index ed9d1ae..f6cedce 100644 --- a/src/routes/profile/[profile]/member/[member]/graph/[graph].svelte +++ b/src/routes/profile/[profile]/member/[member]/graph/[graph].svelte @@ -65,9 +65,6 @@ let c = document.querySelector("div#list"); if (c && g) { init(c as HTMLElement, "dark").setOption({ - title: { - text: g.data.name - }, tooltip: { trigger: "axis", order: "valueDesc"