plotly / plotly/plotly.js

add level-of-detail for scatter plots (and geo/sf plots)

Offen
#7,027 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

feature P2
Vorherrschende Sprache
JavaScript
Sterne
18.3k
Forks
2k
Ø Merge
2 T. 12 Std.
Gemergte PRs (30 T.)
28

Beschreibung

Re-opening issue #4190 (copied below) as it is still something that is often an issue in our projects. Further expanding to include sf/geo plots as it would also be useful there as well.


I've been working on some data that has a LOT of lat/long scatter points in a dense area which causes a lot of lag. about 1500-2000 points per viewport seems to work quite fluidly, but above that the click and drag/zoom tools really start to lag (click and drag is by far the worst).

There is already a "max displayed" markers parameter (which I'm putting to use), however it causes "holes" to appear until the user has zoomed in significantly and due to the way the points are organised (equal steps in lat/long) there are weird striations and patterns that occur.

It would look a lot better if I were able to have a Level-of-detail (LOD) parameter. I have a number of thoughts on how this could be achieved.

  • The simplest of which would be a parameter that takes an array of sizes at zoom levels and combined with "max displayed" could be used to grow/shrink the markers at different zooms.
  • Simplest for the user might be a parameter which when active clusters the points (much like the google marker clustering).
  • More complex could be that the user supplies an array of their own data points to display at various zoom levels and the marker size for each step.
  • Finally, the user could add a trace for each of the different zoom levels and specify at which level the trace should be visible.

Obviously some of these could be done 3rd party by tapping onto the events, however it would be more suitable to add to the core library I think.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Das Issue nennt keine Dateien, Tests oder einen spezifischen Einstiegspunkt. Überprüfe zunächst das Verhalten der Markierung "max displayed" und die Verarbeitung der Zoom-Interaktion und ermittle anschließend, welche der vorgeschlagenen LOD-Ansätze das Projekt für scatter- und geo/sf-Plots unterstützen sollte. Als abgeschlossen gilt die Aufgabe, wenn ein abgestimmtes Design, ein Implementierungsumfang und eine Performance-Validierung für dichte Punktansichten vorliegen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
data-visualization
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.