fix(plugins/stargazers): bad scale when not enough values [skip ci]

This commit is contained in:
lowlighter
2023-01-08 12:59:59 -05:00
parent fd2e77485b
commit b6427391a1

View File

@@ -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")