plotly / plotly/plotly.js

[BUG]: Getting strange choropleth map output when locationmode is set to geojson-id

オープン
#7,724 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

@camdecoster がすでに取り組んでいます。

2026年3月11日 から。

bug
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

Description

I'm working on a choropleth map that features data at the US Metropolitan Statistical Area (MSA) level. This process involves (1) loading in simplified MSA-level GeoJSON data; (2) loading data into a Danfo.js DataFrame; and (3) rendering my map within Plotly.js. Because I'm using custom shapefiles here, I need to use geojson-id as my locationmode argument and a custom featureidkey ("properties.MSA") in order to link my shapefiles and data.

My map renders well when using choroplethmap, but I'd really like to get the map working using choropleth, as I'll then be able to display Alaska and Hawaii within the same window as the contiguous US. However, as shown in the screenshots, something is clearly not working right.

Screenshots/Video

Output when using choropleth to render the map:

Image

Output when creating a tiled map via choroplethmap instead:

Image

I also tried creating a state-level map via a separate set of GeoJSON outlines and JSON data, but this failed to work correctly as well:

Image
Steps to reproduce

Here is a link to my script: https://codepen.io/kburchfielifs/pen/OPRNOMo

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。