Skip to content

Commit 54d74ee

Browse files
committed
replace complicated v-counties example with state labels
1 parent 0e15962 commit 54d74ee

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/transforms/centroid.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import * as topojson from "topojson-client";
66
import {computed, shallowRef, onMounted} from "vue";
77

88
const us = shallowRef(null);
9-
const countymesh = computed(() => us.value ? topojson.mesh(us.value, us.value.objects.counties) : {type: null});
109
const statemesh = computed(() => us.value ? topojson.mesh(us.value, us.value.objects.states) : {type: null});
1110
const states = computed(() => us.value ? topojson.feature(us.value, us.value.objects.states).features : []);
1211
const counties = computed(() => us.value ? topojson.feature(us.value, us.value.objects.counties).features : []);
@@ -20,7 +19,7 @@ onMounted(() => {
2019

2120
# Centroid transform
2221

23-
Plot offers two transforms that derive centroids from GeoJSON geometries: [centroid](#centroid-options) and [geoCentroid](#geocentroid-options). These transforms can be used by any mark that accepts **x** and **y** channels. For instance, to label U.S. states we can use a [text mark](../marks/text.md).
22+
Plot offers two transforms that derive centroids from GeoJSON geometries: [centroid](#centroid-options) and [geoCentroid](#geocentroid-options). These transforms can be used by any mark that accepts **x** and **y** channels. For instance, a [text mark](../marks/text.md) to label the U.S. States.
2423

2524
:::plot defer https://observablehq.com/@observablehq/plot-state-labels
2625
```js

0 commit comments

Comments
 (0)