From cec33944f9563a97f322935ecab60f9269f56c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Thu, 27 Apr 2023 11:57:32 -0700 Subject: [PATCH] remove precision(2), which introduces unnecessary complexity (for a nicer circle, I'd recommend we change the default precision of d3.geoCircle, cf. https://github.com/d3/d3-geo/issues/270) --- docs/features/projections.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/features/projections.md b/docs/features/projections.md index e02e7ffef5c..4e084e25641 100644 --- a/docs/features/projections.md +++ b/docs/features/projections.md @@ -7,7 +7,7 @@ import {computed, ref, shallowRef, onMounted} from "vue"; const longitude = ref(90); const radius = ref(30); -const circle = computed(() => d3.geoCircle().center([9, 34]).radius(radius.value).precision(2)()); +const circle = computed(() => d3.geoCircle().center([9, 34]).radius(radius.value)()); const projection = ref("equirectangular"); const westport = shallowRef({type: null}); const earthquakes = shallowRef([]); @@ -161,7 +161,7 @@ Plot.plot({ ``` ```js -circle = d3.geoCircle().center([9, 34]).radius(radius).precision(2)() +circle = d3.geoCircle().center([9, 34]).radius(radius)() ``` If none of Plot’s built-in projections meet your needs, you can use any of [D3’s extended projections](https://github.com/d3/d3-geo-projection) by specifying the **projection** option as a function that returns a D3 projection. Below, a map of Antarctica in a polar aspect of the *azimuthal-equidistant* projection.