From 0c34a01186ad493a64f81d2b49c4a794529715f1 Mon Sep 17 00:00:00 2001 From: Nick Krecklow Date: Sat, 13 Jun 2020 00:54:31 -0500 Subject: [PATCH] use default y scale for graphs --- assets/js/graph.js | 3 +-- assets/js/servers.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/assets/js/graph.js b/assets/js/graph.js index a52557d..5cb3f72 100644 --- a/assets/js/graph.js +++ b/assets/js/graph.js @@ -201,7 +201,6 @@ export class GraphDisplayManager { const series = this._app.serverRegistry.getServerRegistrations().map(serverRegistration => { return { - scale: 'Players', stroke: serverRegistration.data.color, width: 2, value: (_, raw) => `${formatNumber(raw)} Players`, @@ -287,7 +286,7 @@ export class GraphDisplayManager { } ], scales: { - Players: { + y: { auto: false, range: () => { const visibleGraphData = this.getVisibleGraphData() diff --git a/assets/js/servers.js b/assets/js/servers.js index 717e0ac..93bd0ec 100644 --- a/assets/js/servers.js +++ b/assets/js/servers.js @@ -115,7 +115,6 @@ export class ServerRegistration { series: [ {}, { - scale: 'Players', stroke: '#E9E581', width: 2, value: (_, raw) => `${formatNumber(raw)} Players`, @@ -148,7 +147,7 @@ export class ServerRegistration { } ], scales: { - Players: { + y: { auto: false, range: () => { const { scaledMin, scaledMax } = RelativeScale.scale(this._graphData[1], tickCount)