This commit is contained in:
Nick Krecklow 2020-06-17 22:22:29 -05:00
parent e6de86a9a6
commit 7b1496511f
No known key found for this signature in database
GPG Key ID: 5F149FDE156FFA94
4 changed files with 12 additions and 3 deletions

@ -8,7 +8,13 @@ export class RelativeScale {
const scale = Math.pow(10, factor) const scale = Math.pow(10, factor)
const scaledMin = min - (min % scale) const scaledMin = min - (min % scale)
const scaledMax = max + (max % scale === 0 ? 0 : (scale - (max % scale))) let scaledMax = max + (max % scale === 0 ? 0 : (scale - (max % scale)))
// Prevent min/max from being equal (and generating 0 ticks)
// This happens when all data points are products of scale value
if (scaledMin === scaledMax) {
scaledMax += scale
}
const ticks = (scaledMax - scaledMin) / scale const ticks = (scaledMax - scaledMin) / scale

@ -1,3 +1,6 @@
**5.5.5** *(June 17 2020)*
- Fixes servers with constant player counts failing to render graphs due to the min/max values being equal.
**5.5.4** *(June 16 2020)* **5.5.4** *(June 16 2020)*
- Updated uPlot dependency 1.0.8 -> 1.0.11. - Updated uPlot dependency 1.0.8 -> 1.0.11.

2
package-lock.json generated

@ -1,6 +1,6 @@
{ {
"name": "minetrack", "name": "minetrack",
"version": "5.5.4", "version": "5.5.5",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

@ -1,6 +1,6 @@
{ {
"name": "minetrack", "name": "minetrack",
"version": "5.5.4", "version": "5.5.5",
"description": "A Minecraft server tracker that lets you focus on the basics.", "description": "A Minecraft server tracker that lets you focus on the basics.",
"main": "main.js", "main": "main.js",
"dependencies": { "dependencies": {