Skip to content

Commit

Permalink
dashboard: adjust CSS for chart.js v4
Browse files Browse the repository at this point in the history
continuation of opnsense@d752050

aspect-ratio introduced visual artifacts with dead space when resizing
widgets.
  • Loading branch information
swhite2 committed Feb 12, 2025
1 parent 09eba5d commit d988511
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/opnsense/www/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,12 @@ td {

.canvas-container {
position: relative;
}

.canvas-container > canvas {
/* ChartJS v4 workaround: https://github.com/chartjs/Chart.js/issues/11005 */
aspect-ratio: 2;
overflow: hidden;
width: 100% !important;
height: 100% !important;
}

.cpu-canvas-container {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,12 @@ td {

.canvas-container {
position: relative;
}

.canvas-container > canvas {
/* ChartJS v4 workaround: https://github.com/chartjs/Chart.js/issues/11005 */
aspect-ratio: 2;
overflow: hidden;
width: 100% !important;
height: 100% !important;
}

.cpu-canvas-container {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,12 @@ td {

.canvas-container {
position: relative;
}

.canvas-container > canvas {
/* ChartJS v4 workaround: https://github.com/chartjs/Chart.js/issues/11005 */
aspect-ratio: 2;
overflow: hidden;
width: 100% !important;
height: 100% !important;
}

.cpu-canvas-container {
Expand Down

0 comments on commit d988511

Please sign in to comment.