choropleth: when geojson is set, the geojson file from cdn.plot.ly is still loaded first
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
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 :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior in the linked CodePen with a choropleth trace using the provided geojson URL. Trace the choropleth geojson loading path and verify which requests occur; done means the configured geojson is used without first loading the cdn.plot.ly file, while preserving the example's rendering behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100