[FEATURE]: Please allow for the sizes of clusters within scattermaps to be based on their underlying values

Aperta
#7,741 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
javascript

Direzione di ricerca

Inizia con il CodePen collegato e il comportamento di clustering di scattermap che dimostra. Traccia come vengono attualmente determinate le dimensioni dei marker e dei cluster, quindi definisci come aggregare una variabile sottostante per ogni cluster; il lavoro è completato quando i cluster possono essere dimensionati a partire da quell'aggregato e il comportamento esistente dei marker e del clustering continua a funzionare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature

I am currently working on a scattermap that has thousands of individual circles. The sizes of these circles are based on their underlying population, rather than a fixed value.

When the map is zoomed out quite a bit, these circles end up overlapping--thus making it harder to identify areas with particularly large populations. Therefore, I tried using the cluster feature to group circles together. However, it appears that the sizes of all circles within a given cluster can only be based on the numbers of circles in each cluster.

What I would love to see is the ability to set cluster sizes on an underlying variable (e.g. population). That way, a 5-region cluster with a population of 2 million would be twice as large as that of another 5-region cluster of 1 million. Since it's already possible to base single-marker sizes on a specified variable, I like to think that this wouldn't be too challenging to implement (though I could be wrong).

Here's a Codepen that shows a simplified version of my actual code. (It's based on Plotly's US-city dataset.) Note that all green circles (clusters) are the same size, whereas blue circles (markers) are based on cities' populations. I'd like for the green clusters' sizes to be based on the sum of the populations of all cities in their cluster.

(Note that, in this case, basing cluster sizes on the number of cities that they contain would not be ideal, since city sizes can vary widely.)

Lingua principale
JavaScript
Stelle
18.3k
Fork
2k
Merge medio
2g 10h
PR unite (30g)
30

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di plotly/plotly.js

Tutte le issue di plotly/plotly.js

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.