Skip to content

Commit

Permalink
add proper scaling for memory chart
Browse files Browse the repository at this point in the history
  • Loading branch information
suparious committed Jun 10, 2024
1 parent 8d2654f commit cc1f73e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ document.addEventListener('DOMContentLoaded', function () {
responsive: true,
scales: {
y: {
beginAtZero: true
beginAtZero: true,
ticks: {
callback: function(value) {
return (value / (1024 * 1024 * 1024)).toFixed(2) + ' GB'; // Convert bytes to GB
}
}
}
}
}
Expand Down Expand Up @@ -124,7 +129,12 @@ document.addEventListener('DOMContentLoaded', function () {
responsive: true,
scales: {
y: {
beginAtZero: true
beginAtZero: true,
ticks: {
callback: function(value) {
return (value / (1024 * 1024)).toFixed(2) + ' MB'; // Convert bytes to MB
}
}
}
}
}
Expand Down

0 comments on commit cc1f73e

Please sign in to comment.