Skip to content

Commit

Permalink
Only show boards with friendly name (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Aug 21, 2023
1 parent 1d44553 commit 5eea766
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions site/.eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ module.exports = function (eleventyConfig) {
const data = { data: [], labels: [], backgroundColor: [] };

for (const key of Object.keys(value).sort()) {
data.labels.push(friendlyNames.HaOsBoard[key] || key);
data.data.push(value[key]);
data.backgroundColor.push(
colors.getColor(friendlyNames.HaOsBoard[key] || key)
);
const friendlyName = friendlyNames.HaOsBoard[key];
if (friendlyName) {
data.labels.push(friendlyName);
data.data.push(value[key]);
data.backgroundColor.push(colors.getColor(friendlyName));
}
}

return data;
Expand Down

0 comments on commit 5eea766

Please sign in to comment.