Choropleth: can't add/remove from current selection after zoom
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 38/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript
研究方向
先從提供的 Plotly Express scatter 和 plotly.graph_objects Choropleth 重現開始,接著在 repository 中追蹤 choropleth 選取和地理縮放互動的進入點。確認現有的無縮放 shift-click 行為,並讓縮放後的情況保留並更新目前的選取;完成的標準是,提供的重現可以在縮放後移除一個多邊形,且該操作序列有 coverage。
由索引模型根據 Issue 內容生成。
描述
I don't know if this is a bug or a missing feature, but i'd like to select polygons on a choropleth, zoom, then add/ remove from the current selection via shift+click.
This is especially useful when i want to remove a few central polygons from a big selection small polygons and need to select then zoom in to better see which few to remove.
This is already possible in (non-geographic) scatter plots: click to select, zoom, then shift-click to remove from selection, e.g.
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df.iloc[:20], x="sepal_width", y="sepal_length")
fig.update_layout(clickmode="event+select")
fig.show()
And it's already possible in choropleths without zooming between selecting and shift-clicking.
Here's a code snippet to reproduce the bug (or missing feature).
import plotly.graph_objects as go
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/2011_us_ag_exports.csv')
fig = go.Figure(data=go.Choropleth(
locations=df['code'], # Spatial coordinates
z = df['total exports'].astype(float), # Data to be color-coded
locationmode = 'USA-states', # set of locations match entries in `locations`
colorscale = 'Reds',
colorbar_title = "Millions USD",
))
fig.update_layout(
title_text = '2011 US Agriculture Exports by State',
geo_scope='usa', # limite map scope to USA
clickmode="event+select",
)
fig.show()
Now box-select some polygons, then remove a polygon from the selection by shift-clicking it.
Works nicely.
Box-select some polygons again, zoom in, then try to remove a polygon from the selection by shift-clicking it.
No can do!
- 主要語言
- JavaScript
- 星號
- 18.4k
- 分支
- 2k
- 平均合併
- 2 天 5 小時
- 30 天內合併 PR
- 16
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
plotly/plotly.js 的其他 Issue
-
bug P3 size: 3
難度 2/5 1-3 小時 新手友好度 86/100
plotly/plotly.js#8108 · 1 則留言 ·
維護者通常 1 天內回覆
-
chore P3 plotly-internal size: 3 task
難度 2/5 1-3 小時 新手友好度 77/100
plotly/plotly.js#8064 · 1 則留言 ·
維護者通常 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 天內回覆
-
[mkdocs] Update link in Edit this Page button可能重新可做 @AbhinavKumar-Jha 於 140 天前認領,目前沒有進行中的 PR。 未關閉bug
難度 2/5 1-3 小時 新手友好度 65/100
plotly/plotly.js#7648 · 3 則留言 ·
維護者通常 1 天內回覆
相似的 Issue
-
Bump Firebase JS SDK (12.19.0 → 13.0.0)可能已有人在做 @SelaseKay 今天認領。 未關閉Needs Attention type: enhancement
難度 2/5 1-3 小時 新手友好度 75/100
invertase/react-native-firebase#9364 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
tchiotludo/akhq#3307 · 1 個 reaction ·
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 90/100
DietrichGebert/ponytail#1063 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
zen-browser/desktop#15809 · 1 個 reaction ·
維護者通常 1 天內回覆
-
enhancement
難度 1/5 1 小時以內 新手友好度 90/100