We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f9c77e commit 74e8423Copy full SHA for 74e8423
test/plots/tip.ts
@@ -96,10 +96,10 @@ export async function tipGeoCentroid() {
96
.json<any>("data/us-counties-10m.json")
97
.then((us) => [feature(us, us.objects.counties), mesh(us, us.objects.counties)])
98
]);
99
- // Alternatively, using geoCentroid:
100
- // const {x, y} = Plot.geoCentroid();
101
- // const pointer = Plot.pointer({px: x, py: y, x, y});
102
- const pointer = Plot.pointer(Plot.centroid());
+ // Alternatively, using centroid (slower):
+ // const pointer = Plot.pointer(Plot.centroid());
+ const {x, y} = Plot.geoCentroid();
+ const pointer = Plot.pointer({px: x, py: y, x, y});
103
return Plot.plot({
104
width: 960,
105
height: 600,
0 commit comments