Skip to content

Commit

Permalink
v5.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
novykh committed May 20, 2024
1 parent 9be1748 commit cca79d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@netdata/charts",
"version": "5.0.8",
"version": "5.0.9",
"description": "Netdata frontend SDK and chart utilities",
"main": "dist/index.js",
"module": "dist/es6/index.js",
Expand Down
1 change: 1 addition & 0 deletions src/sdk/plugins/unitConversion/getConversionUnits.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const scalable = (units, delta, desiredUnits) => {
}
}

delta = delta * (scaleByKey[prefix] || 1)
const scale = [...scaleKeys].reverse().find(scale => delta >= (scaleByKey[scale] || 1))

return scale
Expand Down

0 comments on commit cca79d3

Please sign in to comment.