Skip to content

Commit

Permalink
v5.0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
novykh committed May 20, 2024
1 parent 9b93202 commit aaa76a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
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.12",
"version": "5.0.13",
"description": "Netdata frontend SDK and chart utilities",
"main": "dist/index.js",
"module": "dist/es6/index.js",
Expand Down
2 changes: 2 additions & 0 deletions src/sdk/makeChart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ export default ({
const en = node.getAttribute("en")
if (!en?.[key]) return count === 1 ? key : pluralize ? `${key}s` : key

if (typeof en[key] === "string") return en[key]

return count === 1 ? en[key]?.one || key : en[key]?.other || (pluralize ? `${key}s` : key)
}

Expand Down
4 changes: 2 additions & 2 deletions src/sdk/plugins/unitConversion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const baseConvert = (chart, unitsKey = "units", min, max) => {
`${unitsKey}ByContext`,
Object.keys(unitsStsByContext).reduce((h, ctx) => {
h[ctx] = getConversionAttributes(chart, unitsStsByContext[ctx].units, {
min: unitsStsByContext[ctx].min,
max: unitsStsByContext[ctx].max,
min: min || unitsStsByContext[ctx].min,
max: max || unitsStsByContext[ctx].max,
})
return h
}, {})
Expand Down

0 comments on commit aaa76a1

Please sign in to comment.