[FEATURE]: Allow fitbounds to use only a subset of traces
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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]
}
}
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 21
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/plotly.js のほかの issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
chore P3 plotly-internal size: 3 task
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
chore P1 plotly-internal size: 1 task
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
chore P3 plotly-internal size: 1 task
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
plotly/plotly.js#7648 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
plotly/plotly.js の issue をすべて見る
似ている issue
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
amponce/archive-movie-browser#354 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
saayam-for-all/webapp#1870 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Imageomics/OpenCite#66 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
chr15m/twiiit.com#20 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
antropos17/Aegis#629 ·
メンテナーはふだん 4 日以内に返信