Skip to content

Commit

Permalink
remove precision(2), which introduces unnecessary complexity
Browse files Browse the repository at this point in the history
(for a nicer circle, I'd recommend we change the default precision of d3.geoCircle, cf. d3/d3-geo#270)
  • Loading branch information
Fil authored and mbostock committed Apr 27, 2023
1 parent 8bf752a commit 874a845
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/features/projections.md
Original file line number Diff line number Diff line change
Expand Up @@ -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([]);
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 874a845

Please sign in to comment.