plotly / plotly/plotly.js

choropleth: when geojson is set, the geojson file from cdn.plot.ly is still loaded first

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

まだ誰も着手していません。

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

説明

When using type: choropleth and setting a geojson url, the geojosn file from cdn.plot.ly still is loaded first.
I'd expect that only the specified geojson file is loaded and used.

(This would be useful to e.g. implement a strict CSP on a site using plotly)


Example: https://codepen.io/lucavazz/pen/jOdrWgV
(baed on https://codepen.io/lucavazz/pen/poGbybw / #4267)

var data = [{
   // ...
   geojson: 'https://unpkg.com/sane-topojson@4.0.0/dist/world_110m.json' 
   // this url is an example, in practice this would point to a relative assets path
}]

image


Is this intended behavior / is some configuration missing in the example to only use the provided geojson or is this a bug in the implementation?

Thanks in advance :)

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

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

はじめの一歩

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

調査の方向性

提供された geojson URL を使用し、choropleth trace でリンク先の CodePen の動作を再現します。choropleth geojson の読み込み経路を追跡し、どのリクエストが発生するかを確認します。設定された geojson が cdn.plot.ly ファイルを先に読み込むことなく使用され、同時に例のレンダリング動作が維持されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
data-visualization, frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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