[FEATURE]: Allow fitbounds to use only a subset of traces
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- data-visualization
Direzione di ricerca
Start by tracing how scattergeo handles layout.geo.fitbounds and gathers locations, then read the linked discussion in issue #8046. Define how a trace-selection option should work while keeping unselected routes visible, and verify the selected-route extent, including antimeridian-crossing routes, without changing the broader view.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
I would like to request a way to control which traces participate in the fitbounds calculation.
The current behavior is correct in the sense that fitbounds considers all relevant traces in the graph. However, for interactive maps with multiple routes, it would be useful to fit the view to a selected trace (or subset of traces) while keeping the other traces visible.
Related issue
This feature request follows from the discussion in the closed issue:
More specifically, this follows from camdecoster's comment on #8046.
Use case
I am building an interactive flight-route map using scattergeo.
The map contains many flight routes. When the user selects one route, I would like to:
- Keep all routes visible.
- Fit/zoom the map to the selected route only.
- Keep the other routes visible, but exclude them from the calculation used to determine the fitted view.
This is particularly important for routes crossing the antimeridian.
For example, a route from Vancouver (YVR) to Seoul (ICN) crosses the antimeridian. If this is the only trace in the graph, fitbounds: 'locations' correctly fits the route and rotates the map to the Pacific.
However, when all the other routes are present, fitbounds considers their locations as well, resulting in a much wider/global view.
Current workaround
I tried temporarily removing the other routes, fitting the map to the selected route, and then adding the other routes back.
The first two steps work correctly:
- Remove/disable the other routes.
- Fit the view to the selected route.
However, as soon as the other routes are added back, fitbounds recalculates using all traces and the view immediately returns to the wider extent.
I also tried making the other routes transparent, but opacity does not exclude their locations from the fitbounds calculation.
I therefore currently have to choose between fitting the map correctly to the selected route and keeping all routes in the graph.
Proposed feature
It would be useful to have a way to specify which traces should participate in the fitbounds calculation.
For example, conceptually something like:
layout: {
geo: {
fitbounds: 'locations',
fitbounds_traces: [3, 7]
}
}
- Lingua principale
- JavaScript
- Stelle
- 18.4k
- Fork
- 2k
- Merge medio
- 1g 19h
- PR unite (30g)
- 20
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di plotly/plotly.js
-
chore P3 plotly-internal size: 3 task
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
plotly/plotly.js#8064 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
chore P1 plotly-internal size: 1 task
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
chore P3 plotly-internal size: 1 task
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
plotly/plotly.js#7648 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug infrastructure P2
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di plotly/plotly.js
Issue simili
-
check:failed feeds:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
iptv-org/database#36278 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
fix
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
idean3885/claude-ops-agent#577 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 7 giorni
-
agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
notionnext-org/NotionNext#4544 ·
I maintainer di solito rispondono entro 1 giorno