Skip to content

Commit

Permalink
chore: show Millions with M
Browse files Browse the repository at this point in the history
  • Loading branch information
iib0011 committed Feb 23, 2022
1 parent 921d032 commit 476fa36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export default class Map {

/** *************************** static *************************** */
static formatClusterText(count) {
if (count > 1000000) {
if (count >= 1000000) {
return `${(count / 1000000).toFixed(1)}M`
} else if (count > 1000) {
} else if (count >= 1000) {
return `${Math.floor(count / 1000)}K`
}
return count
Expand Down

0 comments on commit 476fa36

Please sign in to comment.