Skip to content

Commit

Permalink
5.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryptkeeper committed Jun 18, 2020
1 parent e6de86a commit 7b14965
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
8 changes: 7 additions & 1 deletion assets/js/scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ export class RelativeScale {
const scale = Math.pow(10, factor)

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

Expand Down
3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)*
- Updated uPlot dependency 1.0.8 -> 1.0.11.

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minetrack",
"version": "5.5.4",
"version": "5.5.5",
"description": "A Minecraft server tracker that lets you focus on the basics.",
"main": "main.js",
"dependencies": {
Expand Down

0 comments on commit 7b14965

Please sign in to comment.