choropleth: when geojson is set, the geojson file from cdn.plot.ly is still loaded first
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 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
}]
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 :)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用提供的 geojson URL,通过 choropleth trace 复现所链接 CodePen 中的行为。跟踪 choropleth geojson 的加载路径,并验证发生了哪些请求;完成的标准是使用已配置的 geojson,而无需先加载 cdn.plot.ly 文件,同时保留示例的渲染行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- data-visualization, frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100