Skip to content

Commit

Permalink
styles: Update pie chart component
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGT96 committed Dec 13, 2024
1 parent 3ac6711 commit 219c014
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
4 changes: 3 additions & 1 deletion src/components/accessories/charts/pie/Piechart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ export const Piechart: FC<IOwnProps> = ({ data, title, height, width }) => {

const options = {
responsive: true,
maintainAspectRatio: false,
maintainAspectRatio: true,
plugins: {
legend: {
position: "bottom" as const,
maxHeight: 100,
width: "100px",
},
title: {
display: title !== undefined,
Expand Down
21 changes: 14 additions & 7 deletions src/components/accessories/charts/pie/styles.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
@import "../../../../styles/variables";
@import "../../../../../node_modules/susy/sass/susy";

// .pie {
// max-width: 300px;
// max-height: 300px;
// }
@import "../../../../styles/variables";
@import "../../../../../node_modules/susy/sass/susy";

// .pie {
// max-width: 300px;
// max-height: 300px;
// }

canvas {
height: 100% !important;
width: unset !important;
max-height: calc(100% - 100px) !important;
aspect-ratio: 1 !important;
}
11 changes: 7 additions & 4 deletions src/components/accessories/dashboard/card/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
flex-direction: column;
max-height: 100%;

canvas.pie {
height: unset !important;
width: calc(100% - 100px) !important;
aspect-ratio: 1 !important;
.MuiCardContent-root {
display: flex;
flex-direction: column;
justify-content: end;
canvas {
justify-self: center;
}
}

.DashboardCard-item-header {
Expand Down

0 comments on commit 219c014

Please sign in to comment.