Skip to content

tip mark + pointer interaction #1527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 56 commits into from
May 11, 2023
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c4723ff
tip mark
mbostock May 6, 2023
c4e627c
render transform!
mbostock May 7, 2023
5a50933
pointer interaction
mbostock May 7, 2023
56a23ef
port mbostock/tooltip fixes
mbostock May 7, 2023
568d218
improved tip & pointer
mbostock May 7, 2023
9854e0d
simplify
mbostock May 7, 2023
98be543
better facets; stable anchor
mbostock May 7, 2023
778b38b
px, py; crosshairs
mbostock May 7, 2023
a054cf4
crosshairs composite mark
mbostock May 7, 2023
fbdc96c
crosshair singular
mbostock May 7, 2023
85771cf
transpose facets and marks
mbostock May 8, 2023
532a605
prefer top-left
mbostock May 8, 2023
e6c1ab3
only pass index.f[xyi] if faceted
mbostock May 8, 2023
9a69230
[xy][12]; don’t apply stroke as text fill
mbostock May 8, 2023
5645501
tip + hexbin test
mbostock May 8, 2023
383fcb9
optimize faceting by swapping transforms
mbostock May 8, 2023
992ad54
renderTransform instead of _render
mbostock May 8, 2023
57bd084
only one pointer across facets
mbostock May 8, 2023
72a0d40
suppress other facets when sticky
mbostock May 8, 2023
da1df91
prevent duplicate ARIA when faceting
mbostock May 8, 2023
8174cfa
isolate state per-pointer
mbostock May 8, 2023
e0ac0e0
fix crash with one-dimensional tip
mbostock May 8, 2023
c01a775
if px, default x to null; same for py
mbostock May 8, 2023
9282918
tidier crosshair options
mbostock May 8, 2023
0ede492
use channel label if available
mbostock May 8, 2023
42a6d78
only separating space if named
mbostock May 8, 2023
5759945
crosshair initializer fixes
mbostock May 9, 2023
50a136a
tidier crosshair options
mbostock May 9, 2023
0d15771
remove to-do
mbostock May 9, 2023
8ec7a31
tip + dodge test
mbostock May 9, 2023
8b6f84e
cleaner facet translate
mbostock May 9, 2023
c385d6b
crosshair text using channel alias
mbostock May 9, 2023
736b45d
preTtier
mbostock May 9, 2023
99d4554
fix transform for [xy][12]
mbostock May 9, 2023
0521e70
p[xy] precedence
mbostock May 9, 2023
f6e68dd
pointer comments
mbostock May 9, 2023
98ad85b
tip textAnchor
mbostock May 9, 2023
d24bb0a
more tip options
mbostock May 9, 2023
6512367
more tip options, comments
mbostock May 9, 2023
f40792f
bandwidth offset
mbostock May 9, 2023
45d1d43
fix for multi-facet, multi-pointer
mbostock May 9, 2023
00be814
fix dimensions
mbostock May 10, 2023
c8417e3
tip side anchors
mbostock May 10, 2023
5b52428
tipped helper
mbostock May 10, 2023
c394c6e
raster nearest
mbostock May 10, 2023
3365727
color swatch; fix f[xy]; no tip aesthetic channels
mbostock May 10, 2023
4570bb9
multi-line, summary ariaLabel
mbostock May 10, 2023
36aa6b1
tidier formatting
mbostock May 10, 2023
383cb40
tidier crosshair
mbostock May 11, 2023
c0ec5c5
project p[xy], too
mbostock May 11, 2023
5f9c77e
centroid test
mbostock May 11, 2023
74e8423
geoCentroid test
mbostock May 11, 2023
0003e4f
shorthand extra channels
mbostock May 11, 2023
727c45b
no pointer-specific state
mbostock May 11, 2023
3921672
revert Mark interface change
mbostock May 11, 2023
7faaee3
remove dead code
mbostock May 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
geoCentroid test
  • Loading branch information
mbostock committed May 11, 2023
commit 74e8423269f981612f073583a338e75627083bbb
8 changes: 4 additions & 4 deletions test/plots/tip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ export async function tipGeoCentroid() {
.json<any>("data/us-counties-10m.json")
.then((us) => [feature(us, us.objects.counties), mesh(us, us.objects.counties)])
]);
// Alternatively, using geoCentroid:
// const {x, y} = Plot.geoCentroid();
// const pointer = Plot.pointer({px: x, py: y, x, y});
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});
return Plot.plot({
width: 960,
height: 600,
Expand Down