Skip to content

Commit

Permalink
arrange colours of chart by odd first, then even
Browse files Browse the repository at this point in the history
  • Loading branch information
codemist committed Jul 25, 2023
1 parent c7c4355 commit 2dce8fc
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.
54 changes: 27 additions & 27 deletions src/app/components/client/Chart.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,111 +129,111 @@
}
}
.slice:nth-child(3) {
stroke: $color-purple-80;
stroke: $color-purple-70;
}
.legend tbody tr:nth-child(2) {
.chartAndLegendWrapper:has(.slice:nth-child(3):hover) & {
color: $color-purple-80;
color: $color-purple-70;
}

rect {
fill: $color-purple-80;
fill: $color-purple-70;
}
}
.slice:nth-child(4) {
stroke: $color-purple-70;
stroke: $color-purple-50;
}
.legend tbody tr:nth-child(3) {
.chartAndLegendWrapper:has(.slice:nth-child(4):hover) & {
color: $color-purple-70;
color: $color-purple-50;
}

rect {
fill: $color-purple-70;
fill: $color-purple-50;
}
}
.slice:nth-child(5) {
stroke: $color-purple-60;
stroke: $color-purple-30;
}
.legend tbody tr:nth-child(4) {
.chartAndLegendWrapper:has(.slice:nth-child(5):hover) & {
color: $color-purple-60;
color: $color-purple-30;
}

rect {
fill: $color-purple-60;
fill: $color-purple-30;
}
}
.slice:nth-child(6) {
stroke: $color-purple-50;
stroke: $color-purple-10;
}
.legend tbody tr:nth-child(5) {
.chartAndLegendWrapper:has(.slice:nth-child(6):hover) & {
color: $color-purple-50;
color: $color-purple-10;
}

rect {
fill: $color-purple-50;
fill: $color-purple-10;
}
}
.slice:nth-child(7) {
stroke: $color-purple-40;
stroke: $color-purple-80;
}
.legend tbody tr:nth-child(6) {
.chartAndLegendWrapper:has(.slice:nth-child(7):hover) & {
color: $color-purple-40;
color: $color-purple-80;
}

rect {
fill: $color-purple-40;
fill: $color-purple-80;
}
}
.slice:nth-child(8) {
stroke: $color-purple-30;
stroke: $color-purple-60;
}
.legend tbody tr:nth-child(7) {
.chartAndLegendWrapper:has(.slice:nth-child(8):hover) & {
color: $color-purple-30;
color: $color-purple-60;
}

rect {
fill: $color-purple-30;
fill: $color-purple-60;
}
}
.slice:nth-child(9) {
stroke: $color-purple-20;
stroke: $color-purple-40;
}
.legend tbody tr:nth-child(8) {
.chartAndLegendWrapper:has(.slice:nth-child(9):hover) & {
color: $color-purple-20;
color: $color-purple-40;
}

rect {
fill: $color-purple-20;
fill: $color-purple-40;
}
}
.slice:nth-child(10) {
stroke: $color-purple-10;
stroke: $color-purple-20;
}
.legend tbody tr:nth-child(9) {
.chartAndLegendWrapper:has(.slice:nth-child(10):hover) & {
color: $color-purple-10;
color: $color-purple-20;
}

rect {
fill: $color-purple-10;
fill: $color-purple-20;
}
}
.slice:nth-child(11) {
stroke: $color-purple-05;
stroke: $color-violet-90;
}
.legend tbody tr:nth-child(10) {
.chartAndLegendWrapper:has(.slice:nth-child(11):hover) & {
color: $color-purple-05;
color: $color-violet-90;
}

rect {
fill: $color-purple-05;
fill: $color-violet-90;
}
}
/* stylelint-enable no-descending-specificity */
1 change: 0 additions & 1 deletion src/app/components/client/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export const DoughnutChart = (props: Props) => {
/>
);
});

const modalContent = (
<div className={styles.modalBodyContent}>
<p>
Expand Down

0 comments on commit 2dce8fc

Please sign in to comment.