Skip to content

Commit

Permalink
Remove unused variables (#7252)
Browse files Browse the repository at this point in the history
* YDYRCatalogFunctionJob: remove unused variables

These look like leftovers from
some earlier incarnation of the function.

* ColorSchemeOptionRenderer: remove unused variables
  • Loading branch information
pjonsson authored Aug 20, 2024
1 parent 0a9e45b commit 8db918d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
9 changes: 0 additions & 9 deletions lib/Models/Catalog/CatalogFunctions/YDYRCatalogFunctionJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,6 @@ export default class YDYRCatalogFunctionJob extends CatalogFunctionJobMixin(
undefined
);

const regionColumnSplit = DATASETS.find(
(d) => d.title === this.parameters?.["Output Geography"]
)?.geographyName.split("_");
let regionColumn = "";

if (isDefined(regionColumnSplit) && regionColumnSplit!.length === 2) {
regionColumn = `${regionColumnSplit![0]}_code_${regionColumnSplit![1]}`;
}

runInAction(() => {
csvResult.setTrait(CommonStrata.user, "name", `${this.name} Results`);
csvResult.setTrait(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,18 @@ function ramp(
let colors: string[];

/** This could be used to draw text on top of swatches/ramps */
let dark;
if (
n &&
(d3Scale as any)[`scheme${name}`] &&
(d3Scale as any)[`scheme${name}`][n]
) {
colors = (d3Scale as any)[`scheme${name}`][n];
dark = lab(colors[0]).l < 50;
} else {
const interpolate = (d3Scale as any)[`interpolate${name}`];
if (!interpolate) {
return <Invalid />;
}
colors = [];
dark = lab(interpolate(0)).l < 50;
for (let i = 0; i < interpolateWidth; ++i) {
colors.push(rgb(interpolate(i / (interpolateWidth - 1))).hex());
}
Expand Down Expand Up @@ -111,7 +108,6 @@ function swatches(name: string | undefined) {
}
if (!colors) return <Invalid />;
const n = colors.length;
const dark = lab(colors[0]).l < 50;
return (
<svg
viewBox={`0 0 ${n} 1`}
Expand Down

0 comments on commit 8db918d

Please sign in to comment.