Skip to content

Commit

Permalink
refactor: remove unneeded setLegendColors
Browse files Browse the repository at this point in the history
  • Loading branch information
mhobizal-ebay committed May 17, 2024
1 parent c3a531f commit 2730e68
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
19 changes: 0 additions & 19 deletions src/common/charts/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,4 @@ export const chartFontFamily = '"Market Sans", Arial, sans-serif',
})

return colors.map((color: any) => color.lineColor);
},
setLegendColors = function (series: any[]) {
switch (series.length) {
case 1:
return ["primary"];
case 2:
console.log("legend colors");
return ["secondary", "primary"];
case 3:
return ["secondary", "primary", "tertiary"];
default:
return [
"secondary",
"tertiary",
"primary",
"quaternary",
"quinary",
];
}
};
1 change: 0 additions & 1 deletion src/components/ebay-donut-chart/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
chartFontFamily,
backgroundColor,
setDonutColors,
setLegendColors,
} from "../../common/charts/shared";
import { ebayDonut } from "../../common/charts/donut";
import type { WithNormalizedProps } from "../../global";
Expand Down

0 comments on commit 2730e68

Please sign in to comment.