`fitbounds="locations"` parameter not working for `px.choropleth_map`
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 18.8k
- Forks
- 2.8k
- Ø Merge
- 16 Std. 26 Min.
- Gemergte PRs (30 T.)
- 21
Beschreibung
The fitbounds parameter appear not to work when used in choropleth mapbox. The only way I found to pass it to the Figure object was to use the update_geos method.
The following is a sample of the code to show the parameter used:
fig = px.choropleth_mapbox(
df,
geojson=self.geojson,
featureidkey=self.featureidkey,
locations="location_code,
color=self.metric,
mapbox_style="carto-positron",
opacity=0.4
)
fig.update_geos(fitbounds="locations")
When calling fig.show, the plot opens to the (0,0) location in Gulf of Guinea.
Why the fitbounds parameter doesn't work on choropleth mapbox?
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das bereitgestellte px.choropleth_mapbox-Beispiel zu reproduzieren, und untersuche, wie fitbounds von choropleth_mapbox im Vergleich zu update_geos behandelt wird. Verfolge den Einstiegspunkt der Figure-Erzeugung und bestätige, dass die Karte auf die angegebenen Orte statt auf (0,0) zentriert wird; dokumentiere eine gezielte Regressionprüfung für dieses Verhalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 58/100