From b6427391a17f23136c850f2574ee40f5e1e63f4f Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sun, 8 Jan 2023 12:59:59 -0500 Subject: [PATCH] fix(plugins/stargazers): bad scale when not enough values [skip ci] --- source/plugins/stargazers/worldmap/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugins/stargazers/worldmap/index.mjs b/source/plugins/stargazers/worldmap/index.mjs index 2f718de1..c669e387 100644 --- a/source/plugins/stargazers/worldmap/index.mjs +++ b/source/plugins/stargazers/worldmap/index.mjs @@ -42,7 +42,7 @@ export default async function(login, {locations, sample, imports, token}) { const svg = d3n.createSVG(480, 315) const countries = JSON.parse(await imports.fs.readFile(imports.paths.join(imports.__module(import.meta.url), "atlas/50m_countries.geojson"))) const geopath = d3.geoPath(d3.geoMercator().fitWidth(svg.attr("width"), countries)) - const splits = [...new Set(stars.values())].sort((a, b) => a - b) + const splits = [...new Set([0, ...stars.values()])].sort((a, b) => a - b) svg .append("g") .selectAll("path")